"use strict";(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([["editor"],{3779:(e,t,n)=>{n.d(t,{A:()=>f});var o=n(70987),r=n(30923),i=n(21403),a=n(51987);function l(e){let t=document.querySelector(".sso-modal");t&&(t.classList.remove("success","error"),e?t.classList.add("success"):t.classList.add("error"))}async function s(){let e=document.querySelector("link[rel=sso-modal]"),t=await (0,o.r)({content:(0,r.Ts)(document,e.href),dialogClass:"sso-modal"}),n=null,i=window.external;if(i.ssoComplete=function(e){if(e.error)l(n=!1);else{l(n=!0);var t=e.expiresAround;let o=document.querySelector("meta[name=sso-expires-around]");o&&o.setAttribute("content",t),window.focus()}i.ssoComplete=null},await new Promise(e=>{t.addEventListener("dialog:remove",e,{once:!0})}),!n)throw Error("sso prompt canceled")}async function c(){let e=document.querySelector("link[rel=sso-session]"),t=document.querySelector("meta[name=sso-expires-around]");if(!(e instanceof HTMLLinkElement)||!function(e){if(!(e instanceof HTMLMetaElement))return!0;let t=parseInt(e.content);return Date.now()/1e3>t}(t))return!0;let n=e.href,o=await fetch(n,{headers:{Accept:"application/json",...(0,a.kt)()}});return await o.json()}(0,i.lB)(".js-sso-modal-complete",function(e){if(window.opener&&window.opener.external.ssoComplete){let t=e.getAttribute("data-error"),n=e.getAttribute("data-expires-around");window.opener.external.ssoComplete({error:t,expiresAround:n}),window.close()}else{let t=e.getAttribute("data-fallback-url");t&&(window.location.href=t)}});let u=null;function d(){u=null}async function f(){await c()||(u||(u=s().then(d).catch(d)),await u)}},4559:(e,t,n)=>{n.d(t,{C:()=>a,i:()=>l});var o=n(71315),r=n(69599),i=n(46493);function a(e,t){(0,r.G7)("arianotify_comprehensive_migration")?l(s(e),{...t,element:t?.element??e}):(0,r.G7)("primer_live_region_element")&&t?.element===void 0?(0,i.Cj)(e,{politeness:t?.assertive?"assertive":"polite"}):l(s(e),t)}function l(e,t){let{assertive:n,element:a}=t??{};(0,r.G7)("arianotify_comprehensive_migration")&&"ariaNotify"in Element.prototype?(a||document.body).ariaNotify(e):(0,r.G7)("primer_live_region_element")&&void 0===a?(0,i.iP)(e,{politeness:n?"assertive":"polite"}):function(e,t,n){let r=n??o.XC?.querySelector(t?"#js-global-screen-reader-notice-assertive":"#js-global-screen-reader-notice");r&&(r.textContent===e?r.textContent=`${e}\u00A0`:r.textContent=e)}(e,n,a)}function s(e){return(e.getAttribute("aria-label")||e.innerText||"").trim()}},6665:(e,t,n)=>{n.d(t,{T:()=>u});var o=n(78314),r=n(25407),i=n(91747),a=n(30459),l=n(96379),s=n(96540),c=n(35898);function u(){let{sendAnalyticsEvent:e}=(0,a.s)(),t=function(){let e=function(){let e=(0,o.t)(),t=(0,c.i)();return(0,s.useMemo)(()=>({react_app:"code-view",repository_id:e.id,repository_nwo:`${e.ownerLogin}/${e.name}`,repository_public:e.public,repository_is_fork:e.isFork,actor_id:t?.id,actor_login:t?.login}),[e,t])}(),t=(0,o.t)(),n=(0,r.yH8)(r.tTz,{owner:t.ownerLogin,repo:t.name});return(0,s.useCallback)((t,o,r)=>{let i={target:t,interaction:o,context:r,...e,...{url:window.location.href,user_agent:window.navigator.userAgent,browser_width:window.innerWidth,browser_languages:window.navigator.languages.join(",")}};(0,l.lS)(n,{method:"POST",body:i})},[e,n])}(),n=(0,i.u)("code_nav_ui_events");return{sendRepoClickEvent:(0,s.useCallback)((o,r={})=>{e("repository.click",o,r),n&&t(o,"click",r)},[e,t,n]),sendRepoKeyDownEvent:(0,s.useCallback)((o,r={})=>{e("repository.keydown",o,r),n&&t(o,"keydown",r)},[e,t,n]),sendStats:(0,s.useCallback)((o,r={})=>{e(o,"",r),n&&t(o,"stats",r)},[e,t,n]),sendMarketplaceActionEvent:(0,s.useCallback)((t,n={})=>{e("marketplace.action.click",t,n)},[e])}}},6923:(e,t,n)=>{n.d(t,{KJ:()=>i,X3:()=>r,g5:()=>a});var o=n(56038);let r=void 0===o.XC,i=!r;function a(){return!!r||!o.XC||!!(o.XC.querySelector('react-app[data-ssr="true"]')||o.XC.querySelector('react-partial[data-ssr="true"][partial-name="repos-overview"]'))}},11083:(e,t,n)=>{n.d(t,{X:()=>h,i:()=>u});var o=n(71315),r=n(34095),i=n(99223),a=n(69599),l=n(21067),s=n(70170);let c=[];function u(e,t=!1,n=.5){if(!o.X3&&!0!==(0,a.G7)("browser_stats_disabled")){if(n<0||n>1)throw RangeError("Sampling probability must be between 0 and 1");void 0===e.timestamp&&(e.timestamp=Date.now()),e.loggedIn=(0,l.M3)(),e.staff=h(),e.bundler=i.v,Math.random()JSON.stringify(e));for(;n.length>0;)t.push(function(e){let t=e.shift(),n=[t],o=t.length;for(;e.length>0&&o<=65536;){let t=e[0].length;if(o+t<=65536){let r=e.shift();n.push(r),o+=t}else break}return n}(n));return t}(c)){var t=e,n=`{"stats": [${r.join(",")}], "target": "${o.XC?.head?.querySelector('meta[name="ui-target"]')?.content||"full"}"}`;try{navigator.sendBeacon&&navigator.sendBeacon(t,n)}catch{}}c=[]}}function h(){return!!o.XC?.head?.querySelector('meta[name="user-staff"]')?.content}o.XC?.addEventListener("pagehide",m),o.XC?.addEventListener("visibilitychange",m)},13195:(e,t,n)=>{n.d(t,{t:()=>s});var o=n(87363),r=n(21403),i=n(97797);function a(e){let t=e.getAttribute("data-required-value"),n=e.getAttribute("data-required-value-prefix");if(e.value===t)e.setCustomValidity("");else{let o=t;n&&(o=n+o),e.setCustomValidity(o)}}(0,o.eC)("[data-required-value]",function(e){a(e.currentTarget)}),(0,i.on)("change","[data-required-value]",function(e){let t=e.currentTarget;a(t),s(t.form)}),(0,o.eC)("[data-required-trimmed]",function(e){let t=e.currentTarget;""===t.value.trim()?t.setCustomValidity(t.getAttribute("data-required-trimmed")):t.setCustomValidity("")}),(0,i.on)("change","[data-required-trimmed]",function(e){let t=e.currentTarget;""===t.value.trim()?t.setCustomValidity(t.getAttribute("data-required-trimmed")):t.setCustomValidity(""),s(t.form)}),(0,o.uE)("input[pattern],input[required],textarea[required],input[data-required-change],textarea[data-required-change],input[data-required-value],textarea[data-required-value]",e=>{let t=e.checkValidity();function n(){let n=e.checkValidity();n!==t&&e.form&&s(e.form),t=n}e.addEventListener("input",n),e.addEventListener("blur",function t(){e.removeEventListener("input",n),e.removeEventListener("blur",t)})});let l=new WeakMap;function s(e){let t=e.checkValidity();for(let n of e.querySelectorAll("button[data-disable-invalid]"))n.disabled=!t}(0,r.lB)("button[data-disable-invalid]",{constructor:HTMLButtonElement,initialize(e){let t=e.form;t&&(l.get(t)||(t.addEventListener("change",()=>s(t)),l.set(t,!0)),e.disabled=!t.checkValidity())}}),(0,r.lB)("input[data-required-change], textarea[data-required-change]",function(e){let t="radio"===e.type&&e.form?e.form.elements.namedItem(e.name).value:null;function n(n){let o=e.form;if(n&&"radio"===e.type&&o&&t)for(let n of o.elements.namedItem(e.name))n instanceof HTMLInputElement&&n.setCustomValidity(e.value===t?"unchanged":"");else e.setCustomValidity(e.value===(t||e.defaultValue)?"unchanged":"")}e.addEventListener("input",n),e.addEventListener("change",n),n(),e.form&&s(e.form)}),document.addEventListener("reset",function(e){if(e.target instanceof HTMLFormElement){let t=e.target;setTimeout(()=>s(t))}})},13523:(e,t,n)=>{n.d(t,{$r:()=>a,M1:()=>l,li:()=>r,pS:()=>c,wE:()=>s});var o=n(71315);let r="X-Fetch-Nonce",i=new Set;function a(e){i.add(e)}function l(){return i.values().next().value||""}function s(e){let t={};return void 0!==e&&(t["X-Fetch-Nonce-To-Validate"]=e),void 0===e?t[r]=l():i.has(e)?t[r]=e:t[r]=Array.from(i).join(","),t}function c(){let e=o.XC?.head?.querySelector('meta[name="fetch-nonce"]')?.content||"";e&&a(e)}},15838:(e,t,n)=>{n.d(t,{Cd:()=>s,E5:()=>l,Im:()=>c,nW:()=>a});var o=n(11083),r=n(94416);let i="stats:soft-nav-duration",a={turbo:"TURBO",react:"REACT","turbo.frame":"FRAME",ui:"UI",hard:"HARD"};function l(){window.performance.clearResourceTimings(),window.performance.mark(i)}function s(e){(0,o.i)({turboFailureReason:e,turboStartUrl:(0,r.dR)(),turboEndUrl:window.location.href})}function c(){let e=function(){if(0===performance.getEntriesByName(i).length)return null;performance.measure(i,i);let e=performance.getEntriesByName(i).pop();return e?e.duration:null}();if(!e)return;let t=a[(0,r.di)()],n=Math.round(e);t===a.react&&document.dispatchEvent(new CustomEvent("staffbar-update",{detail:{duration:n}})),(0,o.i)({requestUrl:window.location.href,softNavigationTiming:{mechanism:t,destination:(0,r.fX)()||"rails",duration:n,initiator:(0,r.Pv)()||"rails"}})}},17120:(e,t,n)=>{n.d(t,{V:()=>CodeEditorExtensions});var o=n(3184),r=n(31635),i=n(39595);let a=class BypassReasonSelectorElement extends HTMLElement{reasonSelected(){this.submitBtn.disabled=!1}copyBlobFields(){let e=document.querySelector(".js-blob-form"),t=document.querySelector(".js-bypass-form");if(e instanceof HTMLFormElement&&t instanceof HTMLFormElement)for(let n of(this.createHiddenInputField(t,"value",document.querySelector(".js-blob-contents").value),this.createHiddenInputField(t,"description",document.querySelector("#commit-description-textarea").value),e.elements))n instanceof HTMLInputElement&&n.name&&!n.name.includes("gitignore")&&"authenticity_token"!==n.name&&this.createHiddenInputField(t,n.name,n.value)}createHiddenInputField(e,t,n){let o=document.createElement("input");o.type="hidden",o.name=t,o.id=`${t}_hidden`,o.value=n,e.appendChild(o),o.required=!0}};(0,r.Cg)([i.aC],a.prototype,"submitBtn",void 0),a=(0,r.Cg)([i.p_],a);var l=n(95439),s=n(77982);let CodeEditorExtensions=class CodeEditorExtensions{static annotateDiscoveredSecrets(e,t){if(!e)return;let n=(0,o._)(CodeEditorExtensions,CodeEditorExtensions,c).call(CodeEditorExtensions,e.getValue(),t);if(!n)return;let{startLine:r,endLine:i,startLineCharacter:a,endLineCharacter:l}=n;e.markText({line:r,ch:a},{line:i,ch:l},{className:"CodeMirror-lint-mark-error"})}static emitAnnotateDiscoveredSecrets(e,t,n){let r=(0,o._)(CodeEditorExtensions,CodeEditorExtensions,c).call(CodeEditorExtensions,e,t);if(!r)return;let{startLine:i,endLine:a,startLineCharacter:l,endLineCharacter:u}=r;(0,s.R)("secret-detected:lint",n,{from:{lineNumber:i,character:l},to:{lineNumber:a,character:u},severity:"error"})}static emitAnnotateDiscoveredSecretsWithLocation(e,t,n,r,i,a){let l=(0,o._)(CodeEditorExtensions,CodeEditorExtensions,u).call(CodeEditorExtensions,e,t,n,r,i);if(!l)return;let{parsedStartLine:c,parsedEndLine:d,startLineCharacter:f,endLineCharacter:m}=l;(0,s.R)("secret-detected:lint",a,{from:{lineNumber:c,character:f},to:{lineNumber:d,character:m},severity:"error"})}};function c(e,t){let n=JSON.parse(t);if(0===n.length||n[0].locations?.length===0)return null;let o=n[0].locations[0],r=e.split(/\r?\n/),i=o.start_line||o.startLine,a=o.end_line||o.endLine,s=o.start_line_byte_position||o.startLineBytePosition||0,c=o.end_line_byte_position||o.endLineBytePosition,u=i-1,d=a-1;if(!(u>d)&&!(u<0)&&!(d>r.length)&&r[u]&&r[d])return{startLine:u,endLine:d,startLineCharacter:(0,l.kN)(r[u],s),endLineCharacter:(0,l.kN)(r[d],c)}}function u(e,t,n,o,r){let i=e.split(/\r?\n/);if(!(--t>--n)&&!(t<0)&&!(n>i.length)&&i[t]&&i[n])return{parsedStartLine:t,parsedEndLine:n,startLineCharacter:(0,l.kN)(i[t],o),endLineCharacter:(0,l.kN)(i[n],r)}}},18651:(e,t,n)=>{n.d(t,{Fr:()=>a,R0:()=>i,U0:()=>s,xl:()=>l});var o=n(71315);let r={Android:"Android",iOS:"iOS",macOS:"macOS",Windows:"Windows",Linux:"Linux",Unknown:"Unknown"};function i(){let e=r.Unknown,t=!1;if(o.cg){let n=o.cg.navigator,i="";try{i=n.userAgent}catch{}let a="";try{a=n?.userAgentData?.platform||n.platform}catch{}-1!==["Macintosh","MacIntel","MacPPC","Mac68K","macOS"].indexOf(a)?e=r.macOS:-1!==["iPhone","iPad","iPod"].indexOf(a)?e=r.iOS:-1!==["Win32","Win64","Windows","WinCE"].indexOf(a)?e=r.Windows:/Android/.test(i)?e=r.Android:/Linux/.test(a)&&(e=r.Linux),t=n?.userAgentData?.mobile??(e===r.Android||e===r.iOS)}return{os:e,isAndroid:e===r.Android,isIOS:e===r.iOS,isMacOS:e===r.macOS,isWindows:e===r.Windows,isLinux:e===r.Linux,isDesktop:e===r.macOS||e===r.Windows||e===r.Linux,isMobile:t}}function a(){return i().isMobile}function l(){return i().isDesktop}function s(){return i().isMacOS}},19117:(e,t,n)=>{n.d(t,{NB:()=>c,Up:()=>s,pk:()=>u});let o=new WeakMap;function r(e){let t=o.get(e);t&&(null!=t.timer&&clearTimeout(t.timer),t.timer=window.setTimeout(()=>{null!=t.timer&&(t.timer=null),t.inputed=!1,t.listener.call(null,e)},t.wait))}function i(e){let t=e.currentTarget,n=o.get(t);n&&(n.keypressed=!0,null!=n.timer&&clearTimeout(n.timer))}function a(e){let t=e.currentTarget,n=o.get(t);n&&(n.keypressed=!1,n.inputed&&r(t))}function l(e){let t=e.currentTarget,n=o.get(t);n&&(n.inputed=!0,n.keypressed||r(t))}function s(e,t,n={wait:null}){o.set(e,{keypressed:!1,inputed:!1,timer:void 0,listener:t,wait:null!=n.wait?n.wait:100}),e.addEventListener("keydown",i),e.addEventListener("keyup",a),e.addEventListener("input",l)}function c(e,t){e.removeEventListener("keydown",i),e.removeEventListener("keyup",a),e.removeEventListener("input",l);let n=o.get(e);n&&(null!=n.timer&&n.listener===t&&clearTimeout(n.timer),o.delete(e))}function u(e){let t=o.get(e);t&&t.listener.call(null,e)}},19189:(e,t,n)=>{n.d(t,{Z:()=>s});var o=n(53552),r=n(78314),i=n(25407),a=n(54571),l=n(96540);function s(){let e=(0,r.t)(),{path:t,action:n,refInfo:s}=(0,o.eu)(),[c]=(0,a.I)(()=>!1,!0,[]);function u(e){return e?`?${e}`:""}function d(e){return c?"":void 0===e?window.location.hash:e?`#${e}`:""}return{getItemUrl:l.useCallback(t=>(0,i.IO9)({repo:e,commitish:s.name,action:"directory"===t.contentType?"tree":"blob",path:t.path}),[e.ownerLogin,e.name,s.name]),getUrl(o={}){let r=(0,i.IO9)({repo:e,commitish:o.commitish||s.name,action:o.action||n,path:o.path||t})+function({params:e,hash:t}){return u(e)+d(t)}(o);return o.absolute?new URL(r,window.location.origin).href:r},createPermalink(o={}){let r=(0,i.IO9)({repo:e,commitish:s.currentOid,action:o.action||n,path:o.path||t})+function({params:e,hash:t}){return u(e)+d(t)}(o);return o.absolute?new URL(r,window.location.origin).href:r},isCurrentPagePermalink:()=>!c&&s.name===s.currentOid&&window.location.pathname.includes(s.currentOid)}}},21067:(e,t,n)=>{let o;function r(){if(!o)throw Error("Client env was requested before it was loaded. This likely means you are attempting to use client env at the module level in SSR, which is not supported. Please move your client env usage into a function.");return o}function i(){return o?.locale??"en-US"}function a(){return!!r().login}function l(){return r().login}n.d(t,{JK:()=>i,M3:()=>a,_$:()=>r,cj:()=>l}),!function(){if("undefined"!=typeof document){let e=document.getElementById("client-env");if(e)try{o=JSON.parse(e.textContent||"")}catch(e){console.error("Error parsing client-env",e)}}}()},30459:(e,t,n)=>{n.d(t,{S:()=>s,s:()=>l});var o=n(21728),r=n(96540),i=n(53419),a=n(49936);function l(){let e,t,n=(0,o.c)(6),l=(0,r.useContext)(a.I);if(!l)throw Error("useAnalytics must be used within an AnalyticsContext");let{appName:s,category:c,metadata:u}=l;n[0]!==s||n[1]!==c||n[2]!==u?(e=(e,t,n)=>{let o={react:!0,app_name:s,category:c,...u};(0,i.BI)(e,{...o,...void 0===n?{}:n,target:t})},n[0]=s,n[1]=c,n[2]=u,n[3]=e):e=n[3];let d=e;return n[4]!==d?(t={sendAnalyticsEvent:d},n[4]=d,n[5]=t):t=n[5],t}function s(){let e,t,n=(0,o.c)(4),{sendAnalyticsEvent:r}=l();n[0]!==r?(e=e=>{r("analytics.click",void 0,void 0===e?{}:e)},n[0]=r,n[1]=e):e=n[1];let i=e;return n[2]!==i?(t={sendClickAnalyticsEvent:i},n[2]=i,n[3]=t):t=n[3],t}},30923:(e,t,n)=>{n.d(t,{Ee:()=>s,b4:()=>c,Ts:()=>l});var o=n(50467);let r=class ResponseError extends Error{constructor(e,t){super(`${e} for HTTP ${t.status}`),(0,o._)(this,"response",void 0),this.response=t,this.name="ResponseError"}};var i=n(69759),a=n(51987);async function l(e,t,n){let o=new Request(t,n);(0,a.tV)(o.headers);let l=await self.fetch(o);if(l.status<200||l.status>=300)throw Error(`HTTP ${l.status}${l.statusText||""}`);return!function(e,t,n=!1){let o=t.headers.get("content-type")||"";if(!n&&!o.startsWith("text/html"))throw new r(`expected response with text/html, but was ${o}`,t);if(n&&!(o.startsWith("text/html")||o.startsWith("application/json")))throw new r(`expected response with text/html or application/json, but was ${o}`,t);let i=t.headers.get("x-html-safe");if(i){if(!e.includes(i))throw new r("response X-HTML-Safe nonce did not match",t)}else throw new r("missing X-HTML-Safe nonce",t)}(function(e){let t=[...e.querySelectorAll("meta[name=html-safe-nonce]")].map(e=>e.content);if(t.length<1)throw Error("could not find html-safe-nonce on document");return t}(e),l),(0,i.B)(e,await l.text())}function s(e,t,n=1e3,o=[200],r=[202]){return async function n(i){let l=new Request(e,t);(0,a.tV)(l.headers);let s=await self.fetch(l);if(r.includes(s.status))return await new Promise(e=>setTimeout(e,i)),n(1.5*i);if(o.includes(s.status))return s;if(s.status<200||s.status>=300)throw Error(`HTTP ${s.status}${s.statusText||""}`);throw Error(`Unexpected ${s.status} response status from poll endpoint`)}(n)}async function c(e,t,n){let{wait:o=500,acceptedStatusCodes:r=[200],max:i=3,attempt:l=0}=n||{},s=async()=>new Promise((n,s)=>{setTimeout(async()=>{try{let o=new Request(e,t);(0,a.tV)(o.headers);let s=await self.fetch(o);if(r.includes(s.status)||l+1===i)return n(s);n("retry")}catch(e){s(e)}},o*l)}),u=await s();return"retry"!==u?u:c(e,t,{wait:o,acceptedStatusCodes:r,max:i,attempt:l+1})}},31803:(e,t,n)=>{n.d(t,{A:()=>l});var o=n(34095),r=n(82591);let i=[],a=0;function l(e){!async function(){i.push(e),await o.G,function(){let e=a;a=i.length,s(i.slice(e),null,window.location.href)}()}()}function s(e,t,n){let o=window.location.hash.slice(1),r={oldURL:t,newURL:n,target:o?document.getElementById(o):null};for(let t of e)t.call(null,r)}l.clear=()=>{i.length=a=0};let c=window.location.href;window.addEventListener("popstate",function(){c=window.location.href}),window.addEventListener("hashchange",function(e){let t=window.location.href;try{s(i,e.oldURL||c,t)}finally{c=t}});let u=null;document.addEventListener(r.z.START,function(){u=window.location.href}),document.addEventListener(r.z.SUCCESS,function(){s(i,u,window.location.href)})},34095:(e,t,n)=>{n.d(t,{G:()=>r,K:()=>i});var o=n(71315);let r=o.XC?.readyState==="interactive"||o.XC?.readyState==="complete"?Promise.resolve():new Promise(e=>{o.XC?.addEventListener("DOMContentLoaded",()=>{e()})}),i=o.XC?.readyState==="complete"?Promise.resolve():new Promise(e=>{o.cg?.addEventListener("load",e)})},35898:(e,t,n)=>{n.d(t,{Q:()=>l,i:()=>s});var o=n(74848),r=n(21728),i=n(96540);let a=i.createContext(void 0);function l(e){let t,n=(0,r.c)(3),{user:i,children:l}=e;return n[0]!==l||n[1]!==i?(t=(0,o.jsxs)(a.Provider,{value:i,children:[" ",l," "]}),n[0]=l,n[1]=i,n[2]=t):t=n[2],t}function s(){return i.useContext(a)}try{a.displayName||(a.displayName="CurrentUserContext")}catch{}try{l.displayName||(l.displayName="CurrentUserProvider")}catch{}},37272:(e,t,n)=>{n.d(t,{E:()=>i});var o=n(74848),r=n(64375);function i({children:e}){return(0,r.P)()?(0,o.jsx)(o.Fragment,{children:e}):null}try{i.displayName||(i.displayName="AllShortcutsEnabled")}catch{}},37285:(e,t,n)=>{n.d(t,{Av:()=>l,BM:()=>o,HX:()=>d,M_:()=>f,RD:()=>u,rb:()=>r});let o="GraphQLTraces",r="GraphQLTracingRefresh",i=a()?decodeURIComponent(new URLSearchParams(window.location.search).get("disable_clusters")||"").split(",").filter(e=>""!==e):[];function a(){return"undefined"!=typeof window}function l(e){if(!a()||!s()||!e)return;let t=window;t&&!t[o]&&(t[o]=[]),t&&e.__trace&&(t[o].push(e.__trace),"function"==typeof t[r]&&t[r]())}function s(){if(!a())return!1;let e=window;return"true"===new URLSearchParams(window.location.search).get("_tracing")||e&&void 0!==e[o]}function c(){return i.length>0}function u(e){if(!a()||!s()&&!c())return e;let t=new URL(e,window.location.origin);return s()&&t.searchParams.set("_tracing","true"),c()&&t.searchParams.set("disable_clusters",i.join(",")),t.pathname+t.search}function d(e){return i.indexOf(e)>-1}function f(e){if(!a())return;let t=i.indexOf(e);t>-1?i.splice(t,1):i.push(e);let n=new URLSearchParams(window.location.search);n.set("disable_clusters",i.join(",")),window.location.search=n.toString()}},39111:(e,t,n)=>{n.d(t,{X:()=>r});var o=n(54571);function r(e){let t=e.join(","),[n]=(0,o.I)(()=>{let e=/Windows/.test(navigator.userAgent)?"windows":/Macintosh/.test(navigator.userAgent)?"mac":null;return!!e&&t.includes(e)},!1,[t]);return n}},41245:(e,t,n)=>{n.d(t,{A:()=>o});let o=(e,t)=>{let n=new URL(e,window.location.origin),o=new URL(t,window.location.origin);return o.href.includes("#")&&n.host===o.host&&n.pathname===o.pathname&&n.search===o.search}},44569:(e,t,n)=>{n.d(t,{$$:()=>c,GI:()=>a,fg:()=>s,zw:()=>i});var o=n(18651),r=n(87465);let i=()=>{if("undefined"==typeof document)return!1;let e=document.querySelector("meta[name=keyboard-shortcuts-preference]");return!e||"all"===e.content},a=e=>/Enter|Arrow|Escape|Meta|Control|Mod|Esc|Tab/.test(e)||!(0,o.U0)()&&e.includes("Alt")&&e.includes("Shift"),l=new Set(["button","checkbox","color","file","hidden","image","radio","range","reset","submit"]);function s(e){if(!(e instanceof HTMLElement))return!1;let t=e.nodeName.toLowerCase(),n=e.getAttribute("type")?.toLowerCase()??"text",o="true"===e.ariaReadOnly||"true"===e.getAttribute("aria-readonly")||null!==e.getAttribute("readonly");return("select"===t||"textarea"===t||"input"===t&&!l.has(n)||e.isContentEditable)&&!o}let c=e=>{let t=(0,r.Vy)(e),n=i()&&!s(e.target);return a(t)||n}},46865:(e,t,n)=>{n.d(t,{Cy:()=>l,K3:()=>u,Z8:()=>s,k_:()=>i,lK:()=>d,m$:()=>a});var o=n(88578);function r(e,t,n){return e.dispatchEvent(new CustomEvent(t,{bubbles:!0,cancelable:n}))}function i(e,t){t&&(function(e,t){if(!(e instanceof HTMLFormElement))throw TypeError("The specified element is not of type HTMLFormElement.");if(!(t instanceof HTMLElement))throw TypeError("The specified element is not of type HTMLElement.");if("submit"!==t.type)throw TypeError("The specified element is not a submit button.");if(!e||e!==t.form)throw Error("The specified element is not owned by the form element.")}(e,t),(0,o.A)(t)),r(e,"submit",!0)&&e.submit()}function a(e,t){if("boolean"==typeof t)if(e instanceof HTMLInputElement)e.checked=t;else throw TypeError("only checkboxes can be set to boolean value");else if("checkbox"===e.type)throw TypeError("checkbox can't be set to string value");else e.value=t;r(e,"change",!1)}function l(e,t){for(let n in t){let o=t[n],r=e.elements.namedItem(n);r instanceof HTMLInputElement?r.value=o:r instanceof HTMLTextAreaElement&&(r.value=o)}}function s(e){if(!(e instanceof HTMLElement))return!1;let t=e.nodeName.toLowerCase(),n=(e.getAttribute("type")||"").toLowerCase();return"select"===t||"textarea"===t||"input"===t&&"submit"!==n&&"reset"!==n||e.isContentEditable}function c(e){return new URLSearchParams(e)}function u(e,t){let n=new URLSearchParams(e.search);for(let[e,o]of c(t))n.append(e,o);return n.toString()}function d(e){return c(new FormData(e)).toString()}},49936:(e,t,n)=>{n.d(t,{I:()=>o});let o=(0,n(96540).createContext)(null)},51987:(e,t,n)=>{n.d(t,{jC:()=>s,kt:()=>a,tV:()=>l});var o=n(87057),r=n(69599),i=n(13523);function a(e){let t={"X-Requested-With":"XMLHttpRequest",...(0,i.wE)(e)};return(0,r.G7)("client_version_header")&&(t={...t,[o.S]:(0,o.O)()}),t}function l(e,t){for(let[n,o]of Object.entries(a(t)))e.set(n,o)}function s(e){return{"X-GitHub-App-Type":e}}},53419:(e,t,n)=>{let o;n.d(t,{BI:()=>h,Ti:()=>g,lA:()=>f,sX:()=>m});var r=n(70837),i=n(18679),a=n(82075),l=n(11083);let{getItem:s}=(0,a.A)("localStorage"),c="dimension_",u=["utm_source","utm_medium","utm_campaign","utm_term","utm_content","scid"];try{let e=(0,r.O)("octolytics");delete e.baseContext,o=new i.s(e)}catch{}function d(e){let t=(0,r.O)("octolytics").baseContext||{};if(t)for(let[e,n]of(delete t.app_id,delete t.event_url,delete t.host,Object.entries(t)))e.startsWith(c)&&(t[e.replace(c,"")]=n,delete t[e]);let n=document.querySelector("meta[name=visitor-payload]");for(let[e,o]of(n&&Object.assign(t,JSON.parse(atob(n.content))),new URLSearchParams(window.location.search)))u.includes(e.toLowerCase())&&(t[e]=o);return t.staff=(0,l.X)().toString(),Object.assign(t,e)}function f(e){o?.sendPageView(d(e))}function m(){return document.head?.querySelector('meta[name="current-catalog-service"]')?.content}function h(e,t={}){let n=m(),r=n?{service:n}:{};for(let[e,n]of Object.entries(t))null!=n&&(r[e]=`${n}`);o&&(d(r),o.sendEvent(e||"unknown",d(r)))}function g(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,JSON.stringify(t)]))}},53552:(e,t,n)=>{n.d(t,{eu:()=>s,qV:()=>l,sq:()=>c});var o=n(74848),r=n(79634),i=n(96540);let a=i.createContext({});function l({children:e,...t}){return(0,o.jsx)(a.Provider,{value:t,children:e})}function s(){return i.useContext(a)}function c(){return(0,r.X)()}try{a.displayName||(a.displayName="FilesPageInfoContext")}catch{}try{l.displayName||(l.displayName="FilesPageInfoProvider")}catch{}},53627:(e,t,n)=>{n.d(t,{C3:()=>l,JV:()=>r,K3:()=>d,MM:()=>s,OE:()=>f,Zu:()=>u,bj:()=>i,jc:()=>c,kd:()=>a});var o=n(71315);function r(){return o.Kn?.state||{}}function i(e){m(r(),"",e)}function a(e){o.Kn?.pushState({appId:r().appId},"",e),h()}function l(e){m({...r(),...e},"",location.href)}function s(e){i(`?${e.toString()}${o.fV.hash}`)}function c(){i(o.fV.pathname+o.fV.hash)}function u(e){i(e.startsWith("#")?e:`#${e}`)}function d(){i(o.fV.pathname+o.fV.search)}function f(){o.Kn?.back()}function m(e,t,n){o.Kn?.replaceState(e,t,n),h()}function h(){o.cg?.dispatchEvent(new CustomEvent("statechange",{bubbles:!1,cancelable:!1}))}},54571:(e,t,n)=>{n.d(t,{I:()=>a});var o=n(96540),r=n(88431),i=n(76629);function a(e,t,n=[]){let l=(0,o.useCallback)(e,n),s=(0,i.BP)(),c=(0,o.useRef)(s===i.O8.ClientRender),[u,d]=(0,o.useState)(()=>s===i.O8.ClientRender?l():t),f=(0,o.useCallback)(()=>{d(l)},[l]);return(0,r.N)(()=>{c.current||d(l),c.current=!1},[l,...n]),[u,f]}},56038:(e,t,n)=>{n.d(t,{Kn:()=>a,XC:()=>r,cg:()=>i,fV:()=>l});let o="undefined"!=typeof FORCE_SERVER_ENV&&FORCE_SERVER_ENV,r="undefined"==typeof document||o?void 0:document,i="undefined"==typeof window||o?void 0:window,a="undefined"==typeof history||o?void 0:history,l="undefined"==typeof location||o?{pathname:"",origin:"",search:"",hash:"",href:""}:location},61282:(e,t,n)=>{n.d(t,{V:()=>m});var o=n(74848),r=n(21728),i=n(96540),a=n(38621),l=n(26108),s=n(21373),c=n(31604),u=n(69726),d=n(54571);let f=(0,i.lazy)(()=>Promise.all([n.e("primer-react"),n.e("react-lib"),n.e("react-core"),n.e("vendors-node_modules_stacktrace-parser_dist_stack-trace-parser_esm_js-node_modules_github_bro-2f4e04"),n.e("vendors-node_modules_tanstack_query-core_build_modern_mutation_js-node_modules_tanstack_query-9bf7e4"),n.e("vendors-node_modules_dompurify_dist_purify_es_mjs"),n.e("vendors-node_modules_tanstack_query-core_build_modern_queryObserver_js-node_modules_tanstack_-defd52"),n.e("vendors-node_modules_date-fns_format_mjs"),n.e("vendors-node_modules_date-fns_addWeeks_mjs-node_modules_date-fns_addYears_mjs-node_modules_da-827f4f"),n.e("vendors-node_modules_github_relative-time-element_dist_index_js"),n.e("vendors-node_modules_github_hotkey_dist_index_js-node_modules_date-fns_getDaysInMonth_mjs-nod-70c11b"),n.e("vendors-node_modules_dnd-kit_modifiers_dist_modifiers_esm_js-node_modules_dnd-kit_sortable_di-5ada6e"),n.e("vendors-node_modules_braintree_browser-detection_dist_browser-detection_js-node_modules_githu-bb80ec"),n.e("vendors-node_modules_tanstack_react-virtual_dist_esm_index_js"),n.e("vendors-node_modules_tanstack_react-query_build_modern_useQuery_js-node_modules_diff_lib_index_mjs"),n.e("vendors-node_modules_react-relay_index_js"),n.e("vendors-node_modules_comma-separated-tokens_index_js-node_modules_mdast-util-from-markdown_li-6db53e"),n.e("vendors-node_modules_hastscript_lib_index_js-node_modules_mdast-util-gfm_lib_index_js-node_mo-2895d2"),n.e("vendors-node_modules_github_mini-throttle_dist_decorators_js-node_modules_accname_dist_access-ce77c7"),n.e("vendors-node_modules_remark-parse_lib_index_js-node_modules_unified_lib_index_js"),n.e("vendors-node_modules_lowlight_lib_all_js-node_modules_react-markdown_lib_index_js-node_module-5ac2ea"),n.e("vendors-node_modules_emoji-regex_index_js-node_modules_fzy_js_index_js-node_modules_primer_st-8d576a"),n.e("packages_paths_index_ts"),n.e("packages_ui-commands_ui-commands_ts"),n.e("packages_date-picker_components_DatePicker_tsx"),n.e("packages_drag-and-drop_drag-and-drop_ts-packages_hydro-analytics_hydro-analytics_ts"),n.e("packages_list-view_src_hooks_use-next-header-tag_ts-packages_list-view_src_ListItem_ListItem_-055669"),n.e("packages_ref-selector_RefSelector_tsx"),n.e("packages_copilot-chat_utils_copilot-local-storage_ts"),n.e("packages_copilot-chat_components_tracing_TraceProvider_tsx"),n.e("packages_copilot-chat_utils_CopilotChatContext_tsx-packages_safe-html_VerifiedHTML_tsx"),n.e("packages_relay-environment_relay-environment_ts"),n.e("packages_item-picker_components_RepositoryPicker_tsx"),n.e("packages_copilot-chat_utils_language-info_ts-packages_copy-to-clipboard_CopyToClipboardButton_tsx"),n.e("packages_history_history_ts-packages_soft-nav_state_ts-packages_agent-sessions_components_new-9fc8d0"),n.e("packages_copilot-markdown_MarkdownRenderer_tsx"),n.e("packages_code-view-shared_hooks_use-repos-analytics_ts-packages_code-view-shared_hooks_use-tr-fbe81a"),n.e("packages_copilot-chat_components_ModelPicker_tsx-packages_copilot-byok_providers_assets_anthr-76f86b"),n.e("packages_agent-sessions_hooks_use-sso-change-detection_ts-packages_agent-sessions_utils_gener-7b2f56"),n.e("packages_failbot_failbot_ts-packages_pull-request-page-data-tooling_utils_fetch-error-handlin-53bc4a"),n.e("packages_use-analytics_use-analytics_ts-packages_github-avatar_GitHubAvatar_tsx-packages_new--590308")]).then(n.bind(n,68747)).then(e=>({default:e.NewAgentTaskButtonContent})));function m(e){let t,n,u,m,p,b,w=(0,r.c)(24),{isIconButton:y,icon:v,label:S,onOpen:_,onClose:k,setContentOpen:L,open:E,currentRepo:R,currentReference:C,hideRepoSelector:x,eventType:j,size:A,tooltipDirection:q}=e,M=void 0===v?a.AgentIcon:v,T=void 0===S?"New agent task":S,[U,N]=(0,i.useState)(!!E);w[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],w[0]=t):t=w[0];let[H]=(0,d.I)(h,!0,t);w[1]!==_?(n=_??(()=>N(!0)),w[1]=_,w[2]=n):n=w[2];let O=n;w[3]!==k?(u=k??(()=>N(!1)),w[3]=k,w[4]=u):u=w[4];let B=u,P=L??N;return w[5]!==M||w[6]!==y||w[7]!==T||w[8]!==A||w[9]!==q?(m=e=>y?(0,o.jsx)(l.K,{icon:M,"aria-label":T,"aria-labelledby":void 0,size:A,tooltipDirection:q,...e}):(0,o.jsx)(s.Q,{...e,leadingVisual:M,size:A,children:T}),w[5]=M,w[6]=y,w[7]=T,w[8]=A,w[9]=q,w[10]=m):m=w[10],w[11]!==C||w[12]!==R||w[13]!==j||w[14]!==P||w[15]!==x||w[16]!==H?(p=!H&&(0,o.jsx)(i.Suspense,{fallback:(0,o.jsx)(g,{}),children:(0,o.jsx)(f,{currentRepo:R,currentReference:C,hideRepoSelector:x,setOpen:P,eventType:j})}),w[11]=C,w[12]=R,w[13]=j,w[14]=P,w[15]=x,w[16]=H,w[17]=p):p=w[17],w[18]!==B||w[19]!==O||w[20]!==U||w[21]!==m||w[22]!==p?(b=(0,o.jsx)(c.T,{width:"large",align:"end",open:U,onOpen:O,onClose:B,renderAnchor:m,children:p}),w[18]=B,w[19]=O,w[20]=U,w[21]=m,w[22]=p,w[23]=b):b=w[23],b}function h(){return!1}function g(){let e,t=(0,r.c)(1);return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,o.jsx)("div",{className:"d-flex flex-column flex-items-center p-6",children:(0,o.jsx)(u.A,{srText:"Loading..."})}),t[0]=e):e=t[0],e}try{f.displayName||(f.displayName="LazyNewAgentTaskButtonContent")}catch{}try{m.displayName||(m.displayName="NewAgentTaskButton")}catch{}try{g.displayName||(g.displayName="FallbackContent")}catch{}},64375:(e,t,n)=>{n.d(t,{$:()=>a,P:()=>l});var o=n(74848),r=n(96540);let i=r.createContext(!0);function a({allShortcutsEnabled:e,children:t}){return(0,o.jsxs)(i.Provider,{value:e,children:[" ",t," "]})}function l(){return r.useContext(i)}try{i.displayName||(i.displayName="AllShortcutsEnabledContext")}catch{}try{a.displayName||(a.displayName="AllShortcutsEnabledProvider")}catch{}},64830:(e,t,n)=>{n.d(t,{T2:()=>c,cp:()=>h,ud:()=>p});var o=n(74848),r=n(21728),i=n(82075),a=n(96540);let l=(0,i.A)("localStorage"),s="codeView.codeFolding",c="codeView.codeWrapping",u="codeView.centerView",d="codeView.openSymbolsOnClick",f=new Map([[s,"Show code folding buttons"],[c,"Wrap lines"],[u,"Center content"],[d,"Open symbols on click"]]),m=(0,a.createContext)({codeFoldingOption:{},codeWrappingOption:{},codeCenterOption:{},openSymbolsOption:{}}),h=e=>{let t,n,i=(0,r.c)(8),{children:a}=e,l=g(s,!0),f=g(c,!1),h=g(u,!1),p=g(d,!0);i[0]!==h||i[1]!==l||i[2]!==f||i[3]!==p?(t={codeFoldingOption:l,codeWrappingOption:f,codeCenterOption:h,openSymbolsOption:p},i[0]=h,i[1]=l,i[2]=f,i[3]=p,i[4]=t):t=i[4];let b=t;return i[5]!==a||i[6]!==b?(n=(0,o.jsx)(m.Provider,{value:b,children:a}),i[5]=a,i[6]=b,i[7]=n):n=i[7],n};function g(e,t){let n,o,i,s,c=(0,r.c)(11);c[0]!==e?(n=l.getItem(e),c[0]=e,c[1]=n):n=c[1];let u=n;c[2]!==t||c[3]!==u?(o=()=>u?"true"===u:t,c[2]=t,c[3]=u,c[4]=o):o=c[4];let[d,m]=(0,a.useState)(o);c[5]!==e?(i=f.get(e)||"",c[5]=e,c[6]=i):i=c[6];let h=i;return c[7]!==d||c[8]!==h||c[9]!==e?(s={name:e,enabled:d,setEnabled:m,label:h},c[7]=d,c[8]=h,c[9]=e,c[10]=s):s=c[10],s}function p(){return(0,a.useContext)(m)}try{m.displayName||(m.displayName="CodeViewOptionsContext")}catch{}try{h.displayName||(h.displayName="CodeViewOptionsProvider")}catch{}},65432:(e,t,n)=>{n.d(t,{Bu:()=>h,SC:()=>c,Ti:()=>f,iS:()=>u,k5:()=>s,o4:()=>d,rZ:()=>m});var o=n(82591),r=n(73900),i=n(15838),a=n(94416);let l=0;function s(){l=0,document.dispatchEvent(new Event(o.z.INITIAL)),(0,a.xT)()}function c(e){(0,a.LM)()||(document.dispatchEvent(new Event(o.z.PROGRESS_BAR.START)),document.dispatchEvent(new r.sW(e)),(0,a.Vy)(e),(0,a.ZW)(),(0,a.HK)(),(0,i.E5)())}function u(e={}){p(e)&&(l+=1,document.dispatchEvent(new r.ni((0,a.di)(),l)),f(e))}function d(e={}){if(!p(e))return;l=0;let t=(0,a.my)()||a.BW;document.dispatchEvent(new r.Kq((0,a.di)(),t)),g(),(0,i.Cd)(t),(0,a.xT)()}function f(e={}){if(!p(e))return;let t=(0,a.di)();g(),document.dispatchEvent(new r.RQ(t)),(0,a.Ff)(),(0,a.JA)(t)}function m(e={}){p(e)&&((0,i.Im)(),document.dispatchEvent(new Event(o.z.RENDER)))}function h(){document.dispatchEvent(new Event(o.z.FRAME_UPDATE))}function g(){document.dispatchEvent(new Event(o.z.PROGRESS_BAR.END))}function p({skipIfGoingToReactApp:e,allowedMechanisms:t=[]}={}){return(0,a.LM)()&&(0===t.length||t.includes((0,a.di)()))&&(!e||!(0,a.gc)())}},69599:(e,t,n)=>{n.d(t,{G7:()=>s,XY:()=>c,fQ:()=>l});var o=n(5225),r=n(21067);function i(){return new Set((0,r._$)().featureFlags)}let a=n(71315).X3||function(){try{return process?.env?.STORYBOOK==="true"}catch{return!1}}()?i:(0,o.A)(i);function l(){return Array.from(a())}function s(e){return a().has(e)}let c={isFeatureEnabled:s}},69759:(e,t,n)=>{n.d(t,{B:()=>o});function o(e,t){let n=e.createElement("template");return n.innerHTML=t,e.importNode(n.content,!0)}},70987:(e,t,n)=>{n.d(t,{r:()=>r});var o=n(97797);async function r(e){let t=document.querySelector("#site-details-dialog").content.cloneNode(!0),n=t.querySelector("details"),r=n.querySelector("details-dialog"),i=n.querySelector(".js-details-dialog-spinner");e.detailsClass&&n.classList.add(...e.detailsClass.split(" ")),e.dialogClass&&r.classList.add(...e.dialogClass.split(" ")),e.label?r.setAttribute("aria-label",e.label):e.labelledBy&&r.setAttribute("aria-labelledby",e.labelledBy),document.body.append(t);try{let t=await e.content;i.remove(),r.prepend(t)}catch{i.remove();let t=document.createElement("span");t.textContent=e.errorMessage||"Couldn't load the content",t.classList.add("my-6"),t.classList.add("mx-4"),r.prepend(t)}return n.addEventListener("toggle",()=>{n.hasAttribute("open")||((0,o.h)(r,"dialog:remove"),n.remove())}),r}},71315:(e,t,n)=>{n.d(t,{KJ:()=>o.KJ,Kn:()=>r.Kn,X3:()=>o.X3,XC:()=>r.XC,cg:()=>r.cg,fV:()=>r.fV,g5:()=>o.g5});var o=n(6923),r=n(56038)},73017:(e,t,n)=>{n.d(t,{$6:()=>c,JR:()=>l,vb:()=>a});var o=n(74848),r=n(87448),i=n(96540);let a=u(r.az),l=u(r.EY),s=(0,i.forwardRef)((e,t)=>(0,o.jsx)("div",{ref:t,...e}));s.displayName="Div";let c=u(s);function u(e){let t=(0,i.forwardRef)((t,n)=>{let{html:r,...i}=t;return(0,o.jsx)(e,{ref:n,...i,dangerouslySetInnerHTML:r?{__html:r}:void 0})});return t.displayName=`SafeHTML${e.displayName||e.name}`,t}try{a.displayName||(a.displayName="VerifiedHTMLBox")}catch{}try{l.displayName||(l.displayName="VerifiedHTMLText")}catch{}try{c.displayName||(c.displayName="VerifiedHTMLDiv")}catch{}},73189:(e,t,n)=>{n.d(t,{l:()=>o});let o=()=>void 0},73900:(e,t,n)=>{n.d(t,{Kq:()=>SoftNavErrorEvent,RQ:()=>SoftNavEndEvent,gh:()=>SoftNavPayloadEvent,ni:()=>SoftNavSuccessEvent,sW:()=>SoftNavStartEvent});var o=n(50467),r=n(82591);let i=class SoftNavEvent extends Event{constructor(e,t){super(t),(0,o._)(this,"mechanism",void 0),this.mechanism=e}};let SoftNavStartEvent=class SoftNavStartEvent extends i{constructor(e){super(e,r.z.START)}};let SoftNavSuccessEvent=class SoftNavSuccessEvent extends i{constructor(e,t){super(e,r.z.SUCCESS),(0,o._)(this,"visitCount",void 0),this.visitCount=t}};let SoftNavErrorEvent=class SoftNavErrorEvent extends i{constructor(e,t){super(e,r.z.ERROR),(0,o._)(this,"error",void 0),this.error=t}};let SoftNavEndEvent=class SoftNavEndEvent extends i{constructor(e){super(e,r.z.END)}};let SoftNavPayloadEvent=class SoftNavPayloadEvent extends Event{constructor(e){super("soft-nav:payload"),(0,o._)(this,"payload",void 0),(0,o._)(this,"appPayload",void 0),this.payload=e.payload,this.appPayload=e.appPayload}}},76629:(e,t,n)=>{n.d(t,{BP:()=>d,D3:()=>u,O8:()=>s});var o=n(74848),r=n(21728),i=n(96540),a=n(71315),l=n(88431);let s={ServerRender:"ServerRender",ClientHydrate:"ClientHydrate",ClientRender:"ClientRender"},c=(0,i.createContext)(s.ClientRender);function u(e){let t,n,u,d,f=(0,r.c)(8),{wasServerRendered:m,children:h}=e;f[0]!==m?(t=()=>a.X3?s.ServerRender:m?s.ClientHydrate:s.ClientRender,f[0]=m,f[1]=t):t=f[1];let[g,p]=(0,i.useState)(t);return f[2]!==g?(n=()=>{g!==s.ClientRender&&p(s.ClientRender)},u=[g],f[2]=g,f[3]=n,f[4]=u):(n=f[3],u=f[4]),(0,l.N)(n,u),f[5]!==h||f[6]!==g?(d=(0,o.jsx)(c.Provider,{value:g,children:h}),f[5]=h,f[6]=g,f[7]=d):d=f[7],d}function d(){return(0,i.useContext)(c)}try{c.displayName||(c.displayName="RenderPhaseContext")}catch{}try{u.displayName||(u.displayName="RenderPhaseProvider")}catch{}},76641:(e,t,n)=>{n.d(t,{B:()=>a,j:()=>i});var o=n(97797);let r=new WeakMap;function i(e){return r.get(e)}async function a(e){var t,n;return r.get(e)||l(await (t=e,n="codeEditor:ready",new Promise(e=>{t.addEventListener(n,e,{once:!0})})))}function l(e){if(!(e instanceof CustomEvent))throw Error("assert: event is not a CustomEvent");let t=e.detail.editor;if(!e.target)throw Error("assert: event.target is null");return r.set(e.target,t),t}(0,o.on)("codeEditor:ready",".js-code-editor",l)},77982:(e,t,n)=>{n.d(t,{R:()=>o});function o(e,t,n){if(!t)return;let o=t.className.includes("cm-content")?t:t.querySelector(".cm-content");o&&o.dispatchEvent(new CustomEvent(e,{detail:n}))}},78314:(e,t,n)=>{n.d(t,{d:()=>l,t:()=>s});var o=n(74848),r=n(21728),i=n(96540);let a=i.createContext({});function l(e){let t,n=(0,r.c)(3),{repository:i,children:l}=e;return n[0]!==l||n[1]!==i?(t=(0,o.jsxs)(a.Provider,{value:i,children:[" ",l," "]}),n[0]=l,n[1]=i,n[2]=t):t=n[2],t}function s(){return i.useContext(a)}try{a.displayName||(a.displayName="CurrentRepositoryContext")}catch{}try{l.displayName||(l.displayName="CurrentRepositoryProvider")}catch{}},79198:(e,t,n)=>{var o=n(87363),r=n(76641),i=n(21403),a=n(97797),l=n(82247),s=n(51987);let c=new WeakMap;function u(e){return h(e.querySelector(".js-new-filename-field"))}function d(e){return Array.from(e.querySelectorAll(".js-check-for-fork")).some(l.A)}let f=null;function m(){let e=document.querySelector(".js-blob-form");if(!e)return;let t=e.querySelector(".js-blob-submit");t instanceof HTMLButtonElement&&(t.disabled=!(!d(e)&&function(e){let t=e.querySelector(".js-blob-filename"),n=t.value;return"."!==n&&".."!==n&&".git"!==n&&/\S/.test(t.value)}(e)&&(function(e){let t=e.querySelector(".js-blob-contents");return"true"===t.getAttribute("data-allow-unchanged")||h(t)}(e)||u(e)))),e.querySelector(".js-blob-contents-changed").value=(function(e){let t=e.querySelector(".js-blob-contents");return!!t.getAttribute("data-allow-unchanged")||h(t)})(e).toString(),f&&(h(e.querySelector(".js-blob-contents"))||u(e)?window.onbeforeunload=f:window.onbeforeunload=null)}function h(e){return null==e||("hidden"===e.type?e.value!==e.getAttribute("data-default-value"):e.value!==e.defaultValue)}function g(e){(function(e){let t=w()+e.value;document.querySelector(".js-new-filename-field").value=t})(e),function(e){let t=!0,n=e.value?`Create ${e.value}`:"Create new file",o=e.closest("form"),r=document.querySelector(".js-blob-contents"),i=o.querySelector(".js-new-blob-commit-summary");if(!i)return;let a=document.querySelector(".js-commit-message-fallback"),l=c.get(r),s=document.querySelector(".js-new-filename-field").value;if(l)if(s!==l){let o=h(r)?"Update and rename":"Rename";if(e.value.length&&s.length){let e=l.split("/"),r=s.split("/"),i=e.length-1;for(let n=0;n1;){let n=e.value.split("/"),o=n[0],r=n.slice(1).join("/");""===o||"."===o||".git"===o?(e.value=r,window.setTimeout(t,1)):".."===o?y(e):function(e,t,n){let o=t.trim(),r=document.querySelector(".js-breadcrumb-container");if(o.length>0){let t,n=r.querySelectorAll(".js-path-segment a");t=n.length>1?n[n.length-1].pathname:r.querySelector(".js-repo-root a").pathname;let i=document.querySelector(".js-crumb-template").cloneNode(!0);i.classList.remove("js-crumb-template"),i.querySelector("a").href=t,i.querySelector("span").textContent=o;let a=document.querySelector(".js-crumb-separator").cloneNode(!0);a.classList.remove("js-crumb-separator"),e.before(i),e.before(a)}e.value=n,b(e.value),window.setTimeout(function(){e.focus(),e.setSelectionRange(0,0)},1)}(e,o,r)}}function b(e){let t=w();for(let n of document.querySelectorAll(".js-template-suggestion")){let o=n.getAttribute("data-template-suggestion-pattern");if(o){let r=RegExp(o,"i").test(t+e);if(n.classList.toggle("d-none",!r),r){let t=n.querySelector("a[data-template-button]");if(!t)return;let o=new URL(t.href,window.location.origin);o.searchParams.set("filename",e),t.href=`${o.pathname}${o.search}`}}}}function w(){let e="";for(let t of document.querySelectorAll(".js-breadcrumb-container > .js-path-segment"))e=`${e}${t.textContent}/`;return e}function y(e,t=!1){let n;if(t||(e.value=e.value.replace("../","")),1!==document.querySelector(".js-breadcrumb-container").querySelectorAll(".separator").length){e.previousElementSibling&&e.previousElementSibling.remove();let o=e.previousElementSibling;n=o.textContent.length,o.remove(),t&&(e.value=`${o.textContent}${e.value}`)}b(e.value),window.setTimeout(function(t,n=0){(0===n||t)&&(e.focus(),e.setSelectionRange(n,n))},1,t,n)}async function v(e){let t=e.currentTarget.closest(".js-blob-form"),n=(0,r.j)(t.querySelector(".js-code-editor"));if(null==n)return;let o=e.currentTarget.getAttribute("data-template-url"),i=await fetch(o,{headers:{...(0,s.kt)()}});if(!i.ok)return;let a=await i.text();n.setCode(a)}(0,i.lB)(".js-blob-form",{constructor:HTMLFormElement,initialize(e){setTimeout(()=>{let t;for(let t of e.querySelectorAll("input"))"hidden"===t.getAttribute("type")&&t.getAttribute("class")&&null==t.getAttribute("data-default-value")&&t.setAttribute("data-default-value",t.value);!function(e){let t=e.querySelector(".js-blob-contents"),n=e.querySelector(".js-new-filename-field"),o=e.querySelector(".js-blob-filename"),r=o.hasAttribute("data-new-file");null!=o.defaultValue&&o.defaultValue.length&&!r&&c.set(t,n.value)}(e),m(),("yes"===(t=e.getAttribute("data-github-confirm-unload"))||"true"===t)&&(t=""),null==t&&(t="false"),f="no"===t||"false"===t?null:function(){return t},e.addEventListener("submit",function(){window.onbeforeunload=null})})}}),(0,a.on)("change",".js-blob-contents",function(){let e=document.querySelector(".js-blob-filename");e&&g(e)}),(0,o.eC)(".js-blob-filename",function(e){let t=e.currentTarget;document.querySelector(".js-blob-contents").setAttribute("data-filename",t.value),b(t.value),g(t)}),(0,o.eC)(".js-breadcrumb-nav",function(e){let t=e.currentTarget;p(t),g(t)}),(0,i.lB)(".js-breadcrumb-nav",{constructor:HTMLInputElement,initialize(e){p(e),g(e)}}),(0,o.Ff)("keydown",".js-breadcrumb-nav",function(e){let t=e.currentTarget;if("Backspace"===e.key&&0===t.selectionStart&&0===t.selectionEnd){let n=t.parentElement;n&&1!==n.querySelectorAll(".separator").length&&(y(t,!0),e.preventDefault())}g(t)}),(0,o.eC)(".js-new-blob-commit-summary",function(e){let t=e.currentTarget;t.closest(".js-file-commit-form").querySelector(".js-too-long-error").classList.toggle("d-none",t.value.length<=50)}),(0,i.lB)(".js-check-for-fork",function(e){let t=e.closest("form"),n=t.querySelector(".js-blob-submit");e.addEventListener("load",function(){!0===d(t)&&(n.disabled=!0)})}),(0,a.on)("click",".js-citation-template",async function(e){await v(e)}),(0,a.on)("change",".js-gitignore-template input[type=radio]",async function(e){await v(e)}),(0,i.lB)(".js-file-commit-form",function(e){if("true"===new URLSearchParams(window.location.search.slice(1)).get("start_commit")){let t=e.querySelector(".js-details-target");t&&t.click()}});var S=n(50467),_=n(31635),k=n(70170),L=n(46865),E=n(69759),R=n(39595),C=n(17120);let x=["loading-preview","show-preview","no-changes-preview","error-preview"],j=["show-code"].concat(x),A=class BlobEditorElement extends HTMLElement{async connectedCallback(){if(this.discoveredSecrets){let e=await (0,r.B)(this);C.V.annotateDiscoveredSecrets(e.editor,this.discoveredSecrets)}}};function q(e){let t=e.classList.contains("show-code")?"show-code":e.classList.contains("template-editor")?"template-editor":"preview";for(let n of e.querySelectorAll(".js-blob-edit-tab")){let e=n.getAttribute("data-tab")===t;n.classList.toggle("selected",e),e?n.setAttribute("aria-current","true"):n.removeAttribute("aria-current")}(0,a.h)(document.querySelector(".js-file-editor-nav"),"tab:change",{name:t})}function M(e){return"true"===e.getAttribute("data-is-gist")}function T(e,t,n){let o=(M(e)?e:t).querySelector(".js-blob-filename");M(e)?o.readOnly=!n:o.disabled=!n,o.style.cursor=n?"auto":"not-allowed"}function U(e){e.closest(".file-header").querySelector(".js-file-editor-nav").hidden=!function(e){for(let t of[".md",".mkdn",".mkd",".mdown",".markdown"])if(e.endsWith(t))return!0;return!1}(e.value)}function N(){let e=document.querySelector(".js-branch-name-label-container"),t=!!document.querySelector(".js-quick-pull-choice-option[value=quick-pull]:checked");e&&(t?e.hidden=!0:e.hidden=!1)}function H(e){let t=e.currentTarget.closest(".js-code-editor");if(!t.classList.contains("show-code")&&!t.classList.contains("template-editor"))return;t.querySelector(".js-blob-edit-code").setAttribute("data-hotkey","Mod+Shift+P");let n=t.closest(".js-blob-form");return P(t,n,!M(t),!M(t)&&function(e,t){let n=t.querySelector(".js-preview-diff-toggle");return n&&n instanceof HTMLInputElement?!n.checked:"true"===t.getAttribute("data-simplediff-enabled")}(0,t))}function O(e,t){e.classList.remove(...j),e.classList.add(t);let n=e.querySelector(".preview-actions");n instanceof HTMLElement&&(n.hidden=!x.includes(t));let o=e.closest(".js-code-editor").querySelector(".focus-trap-banner");o&&"show-code"===t?o.hidden=!1:o&&x.includes(t)&&(o.hidden=!0)}(0,S._)(A,"attrPrefix",""),(0,_.Cg)([R.CF],A.prototype,"discoveredSecrets",void 0),A=(0,_.Cg)([R.p_],A),(0,o.Ff)("keypress","input.js-blob-filename",function(e){if("Enter"===e.key){let t=e.target.form.querySelector("select.js-code-indent-mode");t&&t.focus(),e.preventDefault()}}),(0,o.Ff)("keyup",".js-code-editor[data-is-gist] input.js-blob-filename",function(e){U(e.target)}),(0,i.lB)(".js-branch-name-label-container",N),(0,i.lB)(".js-gist-filename",{add(e){U(e)}}),(0,a.on)("click",".js-blob-edit-code",function(e){let t=e.currentTarget.closest(".js-code-editor");if(t.classList.contains("show-code"))return;t.querySelector(".js-blob-edit-code").removeAttribute("data-hotkey"),O(t,"show-code"),q(t);let n=(0,r.j)(t);n?(n.refresh(),n.focus()):t.classList.contains("js-mobile-code-editor")&&t.querySelector(".js-code-textarea").focus();let o=t.closest(".js-blob-form");T(t,o,!0)}),(0,a.on)("click",".js-blob-edit-preview",H),(0,a.on)("click",".js-preview-diff-toggle",function(e){let t=e.currentTarget;if(t instanceof HTMLInputElement){let n=t.checked,o=e.currentTarget.closest(".js-code-editor"),r=o.closest(".js-blob-form");return P(o,r,!0,!n)}}),(0,a.on)("codeEditor:preview",".js-code-textarea",function(e){e.currentTarget.closest(".js-code-editor").classList.contains("show-code")&&H(e)});let B=null;async function P(e,t,n,o){O(e,"loading-preview"),q(e),T(e,t,!1);let i=!!document.querySelector(".js-quick-pull-choice-option[value=quick-pull]:checked"),a=document.querySelector(".js-blob-preview-form"),l=(0,r.j)(e),s=null,c=1;if(null!=l)s=l.code(),c=l.editor.getCursor("from").line+1;else{if(!e.classList.contains("js-mobile-code-editor"))return;let t=e.querySelector(".js-code-textarea");c=(s=t.value).substring(0,t.selectionStart).split(/\r?\n/).length}M(e)?(0,L.Cy)(a,{blobname:e.querySelector(".js-blob-filename").value,code:s}):(0,L.Cy)(a,{code:s,commit:t.querySelector(".js-commit-oid").value,blobname:t.querySelector(".js-blob-filename").value,willcreatebranch:i.toString(),checkConflict:n.toString()}),B?.abort();let{signal:u}=B=new AbortController;try{let t=new URL(a.action,window.location.origin);o&&t.searchParams.append("avoiddiff","true");let n=await fetch(t.toString(),{method:a.method,body:new FormData(a),signal:u});if(!n.ok)throw Error("network error");let r=await n.text();if(!e.classList.contains("loading-preview"))return;let i=(0,E.B)(document,r),l=M(e)?i:i.querySelector(".data.highlight");if(l||(l=i.querySelector("#readme")),l||(l=i.querySelector(".js-preview-new-file")),l||(l=i.querySelector(".js-preview-msg")),!l&&(l=i.querySelector(".render-container"))&&l.classList.add("is-render-requested"),l){let t=e.querySelector(".js-commit-preview");t.textContent="",t.appendChild(l),O(e,"show-preview"),function(e,t){if(!e.querySelector(".markdown-body")||!e.querySelector("[data-sourcepos]"))return;let n=null;for(let o=t;o>=t-50&&!(n=e.querySelector(`[data-sourcepos^="${o}:"]`));o--);n?.scrollIntoView({block:"start"})}(t,c)}else O(e,"no-changes-preview")}catch{e&&O(e,"error-preview")}}(0,a.on)("change",".js-quick-pull-choice-option",function(e){let t="quick-pull"===e.currentTarget.value,n=document.querySelector(".js-quick-pull-target-branch"),o=document.querySelector(".js-quick-pull-choice-value"),r=document.querySelector(".js-blob-submit");if(N(),t){let e=document.querySelector(".js-quick-pull-new-branch-name"),t=e.getAttribute("data-generated-branch");!e.value.length&&t&&(e.value=t),n.value=e.value,o.value=n.getAttribute("data-default-value")||"",r.textContent=r.getAttribute("data-pull-text")||""}else n.value=n.getAttribute("data-default-value")||"",o.value="",r.textContent=r.getAttribute("data-edit-text")||""}),(0,a.on)("click",".js-quick-pull-choice-option",function(e){if("quick-pull"===e.currentTarget.value){let t=document.querySelector(".js-quick-pull-new-branch-name");t&&(0!==e.clientX||0!==e.clientY)&&(t.focus(),t.select())}});let F=null,W=null;async function I(){let e=document.querySelector(".js-quick-pull-new-branch-name"),t=e.value,n=e.getAttribute("data-generated-branch"),o=document.querySelector(".js-quick-pull-normalization-info"),r=new FormData;r.append("ref",t);let i=e.getAttribute("data-check-url"),a=e.parentElement.querySelector(".js-data-check-url-csrf");F?.abort();let{signal:l}=F=new AbortController;try{let s=await fetch(i,{mode:"same-origin",method:"POST",body:r,signal:l,headers:{Accept:"application/json","Scoped-CSRF-Token":a.value}});if(!s.ok)throw Error("network error");let c=await s.json();if(t!==e.value)return;let u=c.normalized_ref;o.innerHTML=null==c.message_html?"":c.message_html,u||(o.querySelector("code").textContent=n),W&&(W.value=u)}catch{if(t!==e.value)return;W&&(W.value=t)}}let $=(0,k.s)(I,200);(0,o.eC)(".js-quick-pull-new-branch-name",function(e){let t=e.target.value;(W=document.querySelector(".js-quick-pull-target-branch")).value=t,t.length&&$()}),(0,a.on)("click","[data-template-button]",function(){window.onbeforeunload=null}),n(9751),n(57829),n(72602),n(34856),n(32580),n(97340),n(28527),n(76895),n(23653),n(38820),n(97382);var D=n(15237),V=n.n(D);let X={},G={apl:new URL(n(77337),n.b).toString(),asciiarmor:new URL(n(97087),n.b).toString(),"asn.1":new URL(n(91329),n.b).toString(),asterisk:new URL(n(1035),n.b).toString(),brainfuck:new URL(n(78113),n.b).toString(),clike:new URL(n(92377),n.b).toString(),clojure:new URL(n(88497),n.b).toString(),cmake:new URL(n(15345),n.b).toString(),cobol:new URL(n(24257),n.b).toString(),coffeescript:new URL(n(54945),n.b).toString(),commonlisp:new URL(n(81593),n.b).toString(),crystal:new URL(n(44661),n.b).toString(),css:new URL(n(86337),n.b).toString(),cypher:new URL(n(67493),n.b).toString(),d:new URL(n(4225),n.b).toString(),dart:new URL(n(75337),n.b).toString(),diff:new URL(n(56445),n.b).toString(),django:new URL(n(46669),n.b).toString(),dockerfile:new URL(n(29123),n.b).toString(),dtd:new URL(n(30977),n.b).toString(),dylan:new URL(n(70317),n.b).toString(),ebnf:new URL(n(59633),n.b).toString(),ecl:new URL(n(33158),n.b).toString(),eiffel:new URL(n(72517),n.b).toString(),elm:new URL(n(38609),n.b).toString(),erlang:new URL(n(95086),n.b).toString(),factor:new URL(n(22397),n.b).toString(),fcl:new URL(n(61097),n.b).toString(),forth:new URL(n(27801),n.b).toString(),fortran:new URL(n(19449),n.b).toString(),gas:new URL(n(52665),n.b).toString(),gfm:new URL(n(48317),n.b).toString(),gherkin:new URL(n(25665),n.b).toString(),go:new URL(n(6583),n.b).toString(),groovy:new URL(n(66399),n.b).toString(),haml:new URL(n(70491),n.b).toString(),handlebars:new URL(n(95479),n.b).toString(),haskell:new URL(n(1229),n.b).toString(),"haskell-literate":new URL(n(37137),n.b).toString(),haxe:new URL(n(38539),n.b).toString(),htmlembedded:new URL(n(26737),n.b).toString(),htmlmixed:new URL(n(6545),n.b).toString(),http:new URL(n(483),n.b).toString(),idl:new URL(n(93409),n.b).toString(),javascript:new URL(n(13393),n.b).toString(),jinja2:new URL(n(31123),n.b).toString(),jsx:new URL(n(86657),n.b).toString(),julia:new URL(n(61917),n.b).toString(),livescript:new URL(n(56577),n.b).toString(),lua:new URL(n(37637),n.b).toString(),markdown:new URL(n(45777),n.b).toString(),mathematica:new URL(n(72793),n.b).toString(),mbox:new URL(n(60215),n.b).toString(),mirc:new URL(n(21441),n.b).toString(),mllike:new URL(n(33047),n.b).toString(),modelica:new URL(n(48415),n.b).toString(),mscgen:new URL(n(50505),n.b).toString(),mumps:new URL(n(30133),n.b).toString(),nginx:new URL(n(47421),n.b).toString(),nsis:new URL(n(82257),n.b).toString(),ntriples:new URL(n(54161),n.b).toString(),octave:new URL(n(16663),n.b).toString(),oz:new URL(n(5457),n.b).toString(),pascal:new URL(n(74823),n.b).toString(),pegjs:new URL(n(66865),n.b).toString(),perl:new URL(n(60985),n.b).toString(),php:new URL(n(42817),n.b).toString(),pig:new URL(n(52837),n.b).toString(),powershell:new URL(n(51857),n.b).toString(),properties:new URL(n(23945),n.b).toString(),protobuf:new URL(n(9937),n.b).toString(),pug:new URL(n(52117),n.b).toString(),puppet:new URL(n(80571),n.b).toString(),python:new URL(n(2575),n.b).toString(),q:new URL(n(11649),n.b).toString(),r:new URL(n(19341),n.b).toString(),rpm:new URL(n(9829),n.b).toString(),rst:new URL(n(89033),n.b).toString(),ruby:new URL(n(57963),n.b).toString(),rust:new URL(n(52923),n.b).toString(),sas:new URL(n(10329),n.b).toString(),sass:new URL(n(27587),n.b).toString(),scheme:new URL(n(49357),n.b).toString(),shell:new URL(n(58533),n.b).toString(),sieve:new URL(n(29201),n.b).toString(),slim:new URL(n(86529),n.b).toString(),smalltalk:new URL(n(24817),n.b).toString(),smarty:new URL(n(45295),n.b).toString(),solr:new URL(n(53467),n.b).toString(),soy:new URL(n(84817),n.b).toString(),sparql:new URL(n(50209),n.b).toString(),spreadsheet:new URL(n(3445),n.b).toString(),sql:new URL(n(87917),n.b).toString(),stex:new URL(n(81263),n.b).toString(),stylus:new URL(n(62055),n.b).toString(),swift:new URL(n(25457),n.b).toString(),tcl:new URL(n(79537),n.b).toString(),textile:new URL(n(38625),n.b).toString(),tiddlywiki:new URL(n(92307),n.b).toString(),tiki:new URL(n(85121),n.b).toString(),toml:new URL(n(96647),n.b).toString(),tornado:new URL(n(90769),n.b).toString(),troff:new URL(n(86977),n.b).toString(),ttcn:new URL(n(22497),n.b).toString(),"ttcn-cfg":new URL(n(86099),n.b).toString(),turtle:new URL(n(22423),n.b).toString(),twig:new URL(n(81249),n.b).toString(),vb:new URL(n(89119),n.b).toString(),vbscript:new URL(n(96297),n.b).toString(),velocity:new URL(n(11833),n.b).toString(),verilog:new URL(n(77681),n.b).toString(),vhdl:new URL(n(2399),n.b).toString(),vue:new URL(n(94125),n.b).toString(),wast:new URL(n(20973),n.b).toString(),webidl:new URL(n(43137),n.b).toString(),xml:new URL(n(50441),n.b).toString(),xquery:new URL(n(89331),n.b).toString(),yacas:new URL(n(7137),n.b).toString(),yaml:new URL(n(27557),n.b).toString(),"yaml-frontmatter":new URL(n(77495),n.b).toString(),z80:new URL(n(79573),n.b).toString()};function K(e,t){let n,o=V().modes[e].dependencies;if(!o)return t();let r=[];for(let e=0;e{0==--n&&t()});for(let e=0;e{e.setOption("mode",e.getOption("mode"))})},V().requireMode=function(e,t){if(V().modes.hasOwnProperty(e))return K(e,t);if(X.hasOwnProperty(e))return X[e].push(t);let n=G[e];if(!n)throw Error(`CodeMirror mode "${e}" not found.`);window.CodeMirror=V();let o=document.createElement("script");o.src=n,o.crossOrigin="anonymous",document.querySelector("meta[name=codemirror-crossorigin-credentials]")&&(o.crossOrigin="use-credentials");let r=document.getElementsByTagName("script")[0],i=X[e]=[t];if(V().on(o,"load",()=>{K(e,()=>{for(let e=0;e{let n={startState:()=>({insideConflict:!1}),token:(e,t)=>{if(e.sol()){if(e.match(/^<<<<<<>>>>>>/))return t.insideConflict=!1,e.skipToEnd(),"conflict-marker line-background-conflict-background"}return t.insideConflict?(e.next(),"line-background-conflict-background"):(e.next(),null)},blankLine:e=>e.insideConflict?"line-background-conflict-background":null};if(t.baseMode){let o=V().getMode(e,t.baseMode);if("null"!==o.name)return V().overlayMode(o,n,!0);let r=V().findModeByMIME(t.baseMode);V().autoLoadMode(t.editor,r.mode)}return n}),V().defineMIME("application/x-conflict","conflict");let z=V();var J=n(19117);async function Q(e){let t=e.getAttribute("data-language-detection-url");if(!t)return;let n=document.querySelector(".js-code-editor");if(!n)return;let o=btoa(encodeURIComponent(e.value)),i=new URL(t,window.location.origin),a=new URLSearchParams(i.search.slice(1));a.append("filename",o),i.search=a.toString();let l=await fetch(i.toString(),{headers:{...(0,s.kt)(),Accept:"application/json"}});if(!l.ok){let e=Error(),t=l.statusText?` ${l.statusText}`:"";throw e.message=`HTTP ${l.status}${t}`,e}let c=await l.json();(await (0,r.B)(n)).setMode(c.language)}(0,o.uE)(".js-detect-filename-language",e=>{(0,J.Up)(e,Q),e.addEventListener("blur",()=>(0,J.NB)(e,Q),{once:!0})});var Y=n(44569),Z=n(31803);let ee=/Macintosh/.test(navigator.userAgent)?"Cmd":"Ctrl",et=new WeakMap,en=new WeakMap,eo={Enter:e=>{e.execCommand("newlineAndIndentContinueMarkdownList")},Tab:e=>en.get(e)?V().Pass:e.somethingSelected()?void e.indentSelection("add"):void(e.getOption("indentWithTabs")?e.replaceSelection(" ","end","+input"):e.execCommand("insertSoftTab")),"Shift-Tab":e=>{if(en.get(e))return V().Pass;e.indentSelection("subtract")},"Cmd-/":"toggleComment","Ctrl-/":"toggleComment",[`${ee}-I`]:e=>es(e,"_"),[`${ee}-B`]:e=>es(e,"**"),[`${ee}-E`]:e=>es(e,"`"),[`${ee}-K`]:e=>(function(e){if(!el(e))return;let t=e.getSelection();if(t){let n=e.listSelections();if(e.replaceSelection(`[${t}](url)`),1===n.length&&n[0].from().line===n[0].to().line){let t=n[0],o={line:t.from().line,ch:Math.max(t.from().ch,t.to().ch)};e.setSelection({ch:o.ch+3,line:o.line},{ch:o.ch+6,line:o.line})}}else{let t=e.getCursor();e.replaceRange("[](url)",t),e.setCursor({line:t.line,ch:t.ch+1})}})(e),[`Shift-${ee}-.`]:e=>ec(e,">"),[`Shift-${ee}-7`]:e=>ec(e,"ol"),[`Shift-${ee}-8`]:e=>ec(e,"-"),[`Shift-${ee}-Alt-V`]:e=>(et.set(e,!0),V().Pass),[`Shift-${ee}-V`]:e=>(et.set(e,!0),V().Pass)},er={"Shift-Ctrl-M":e=>{let t=en.get(e)||!1;en.set(e,!t)},Esc:e=>{en.set(e,!0)}},ei=(e,t,n)=>{el(e)&&n.setAttribute("dir","auto")},ea=(e,t)=>{et.get(e)||function(e,t){if(!el(e))return;let n=e.getSelection(),o=t.clipboardData;if(n&&o){var r;let i=o.getData("text/plain");if(r=i,!/^https?:\/\//i.test(r))return;if(i){let o=e.getCursor();e.replaceSelection(`[${n}](${i})`),e.setCursor({line:o.line,ch:o.ch+i.length+4}),t.preventDefault()}}}(e,t),et.set(e,!1)};function el(e){let t=e.getMode().name;return"gfm"===t||"markdown"===t||"text/x-markdown"===e.getOption("mode")}function es(e,t){if(!el(e))return;let n=e.getSelection();if(n)e.replaceSelection(t+n+t);else{let n=e.getCursor();e.replaceRange(t.repeat(2),n),e.setCursor({line:n.line,ch:n.ch+t.length})}}function ec(e,t){if(!el(e))return;let n=e.getCursor("from"),o=e.getCursor("to"),r=e.getRange({line:n.line,ch:0},o),i=RegExp(`^${"ol"===t?"\\d+\\.":t}\\s`);if(r){let o=r.split(` `),a=o.every(e=>i.test(e));for(let r=0;r{let n=document.createElement("img");n.className="emoji emoji-result",n.height=20,n.width=20,n.alt=`:${e}:`,n.src=o[e][0],n.setAttribute("async",""),t.appendChild(n),t.appendChild(document.createTextNode(` ${e}`))},hint:(t,n,r)=>{if(2===o[e].length){let i=r.from||n.from,a={ch:i.ch-1,line:i.line};t.replaceRange(o[e][1],a,r.to||n.to,"complete")}else t.replaceRange(r.text,r.from||n.from,r.to||n.to,"complete")}};n.push(t)}return n});async function ed(e){var t,n,o,r;let i=e.getCursor();if(t=e,n=i,":"!==t.getTokenAt(n).string||(o=e,1===(r=i).ch||function(e,t){var n,o;let r=(n=e,o=t,n.getRange({line:o.line,ch:o.ch-2},{line:o.line,ch:o.ch-1}));return/\s/.test(r)}(o,r)))try{let t=await eu();V().showHint(e,()=>{let n=e.getCursor(),o=e.getTokenAt(n),r=n.ch,i=n.ch,a=n.line,l=o.string;for(;i-- >-1;){var s;let n=e.getTokenAt({ch:i,line:a}).string,o=i-1,c=e.getTokenAt({ch:o,line:a}).string;if(":"===n&&(s=c,/\s/.test(s)||""===s))return{list:t.filter(e=>-1!==e.text.indexOf(l)),from:V().Pos(a,i),to:V().Pos(a,r)};l=n+l}return{list:[],from:V().Pos(a,0),to:V().Pos(a,r)}},{completeSingle:!1})}catch{}}let ef=class CodeEditor{code(){return this.editor.getValue()}setCode(e){this.editor.setValue(e)}refresh(){this.editor.refresh()}focus(){this.editor.focus()}blur(){this.editor.getInputField().blur()}getDocument(){return this.editor.getDoc()}on(e,t){this.container.addEventListener(e,t)}off(e,t){this.container.removeEventListener(e,t)}setDocument(e){this.editor.swapDoc(e),e.modeOption&&void 0!==e.modeOption.name||this.setMode(e.modeOption)}async loading(e){this.editor.setOption("readOnly",!0),await e(),window.onbeforeunload=null,this.editor.setOption("readOnly",!1)}setMode(e){let t=e;this.mergeMode&&(t={name:"conflict",baseMode:t,editor:this.editor}),"text/x-gfm"===t?this.editor.setOption("mode",{name:"gfm",gitHubSpice:!1}):this.editor.setOption("mode",t);let n=this.container.querySelector(".drag-and-drop");if(n){let e="text/x-gfm"!==t&&"text/x-markdown"!==t;n.hidden=e,this.editor.setOption("dragDrop",e)}if(t&&!this.mergeMode){let e=V().findModeByMIME(t);V().autoLoadMode(this.editor,e.mode)}}setConfirmUnloadMessage(e){this.confirmUnload=function(){return e}}clearConfirmUnloadMessage(){this.confirmUnload=void 0,window.onbeforeunload=null}setupFormBindings(){let e=(e,t)=>{this.confirmUnload&&(window.onbeforeunload=this.confirmUnload),(0,L.m$)(this.textarea,this.code()),el(e)&&ed(e),(0,a.h)(this.container,"change",{editor:e,changes:t})};if(this.editor.on("change",e),this.editor.on("swapDoc",e),this.editor.on("renderLine",ei),this.editor.on("paste",ea),this.confirmUnload){let e=this.textarea.closest("form");if(null==e)return;e.addEventListener("submit",()=>{window.onbeforeunload=null})}}setupControlBindings(){let e=this.container.querySelector(".js-code-indent-width"),t=this.container.querySelector(".js-code-wrap-mode"),n=this.container.querySelector(".js-code-indent-mode");this.editor.setOption("tabSize",parseInt(e.value)),this.editor.setOption("indentUnit",parseInt(e.value)),this.editor.setOption("lineWrapping","on"===t.value),this.editor.setOption("indentWithTabs","space"!==n.value),e.addEventListener("change",()=>{this.editor.setOption("tabSize",parseInt(e.value)),this.editor.setOption("indentUnit",parseInt(e.value))}),t.addEventListener("change",()=>{this.editor.setOption("lineWrapping",null!=t&&"on"===t.value)}),n.addEventListener("change",()=>{this.editor.setOption("indentWithTabs","space"!==n.value)})}setupKeyBindings(){if(this.editor.addKeyMap(eo),this.editor.addKeyMap({"Shift-Cmd-P":()=>{this.blur(),(0,a.h)(this.textarea,"codeEditor:preview")}}),this.textarea&&document.querySelector(".focus-trap-banner")){var e;let t=document.querySelector(".focus-trap-banner"),n=t?.textContent;this.editor.setOption("screenReaderLabel",`${n}`),(e=this.editor).setOption("extraKeys",{Tab:!1,"Shift-Tab":!1}),e.addKeyMap(er)}(0,Y.zw)()||delete V().keyMap.default["Alt-G"]}setupScrollOnHashChange(){(0,Z.A)(()=>{let e=function(e){let t,n,o=e.match(/#?(?:L|-)(\d+)/gi);if(!o)return[];{let e=[];for(t=0,n=o.length;t0&&(this.focus(),this.editor.setCursor({line:e[0]-1,ch:0},{scroll:!0}))})}markText(e,t,n){return this.editor.markText(e,t,{className:n})}constructor(e){if((0,S._)(this,"container",void 0),(0,S._)(this,"textarea",void 0),(0,S._)(this,"filename",void 0),(0,S._)(this,"editor",void 0),(0,S._)(this,"mergeMode",void 0),(0,S._)(this,"confirmUnload",void 0),this.container=e,!this.container)return;this.container.setAttribute("data-editor-loaded",""),this.textarea=this.container.querySelector(".js-code-textarea"),this.filename=this.textarea.getAttribute("data-filename")||"";let t=this.textarea.value,n=this.textarea.getAttribute("data-codemirror-mode"),o="true"===this.textarea.getAttribute("data-codemirror-fixed-height");this.mergeMode="true"===this.textarea.getAttribute("data-merge-mode");let r=this.textarea.clientHeight;this.textarea.style.display="none";let i={lineNumbers:!0,value:t,inputStyle:"contenteditable",theme:"github-light"};this.mergeMode&&(i.gutters=["CodeMirror-linenumbers","merge-gutter"]);let a=this.textarea.parentElement;this.editor=V()(a,i);let l=this.textarea.getAttribute("data-hotkey-scope-id")||"code-editor";if(this.editor.getInputField().setAttribute("id",l),0!==r&&o){let e=this.container.querySelector(".CodeMirror");e&&(e.style.height=`${r}px`)}this.setMode(n),this.setupKeyBindings(),this.setupFormBindings(),this.setupControlBindings(),this.setupScrollOnHashChange()}};(0,i.lB)(".js-code-editor",{constructor:HTMLElement,add:function(e){if((0,r.j)(e)||e.hasAttribute("data-editor-loaded")||e.classList.contains("js-mobile-code-editor"))return;let t=new ef(e),n=e.getAttribute("data-github-confirm-unload")||"";("yes"===n||"true"===n)&&(n=""),"no"!==n&&"false"!==n&&t.setConfirmUnloadMessage(n),(0,a.h)(e,"codeEditor:ready",{editor:t})}});var em=n(30923),eh=n(13195),eg=n(3779),ep=n(29806);let eb={BOTH:"both",INCOMING:"incoming",CURRENT:"current"},ew=/^<<<<<<>>>>>>/,ev=/^=======/,eS=/^(<<<<<<<|=======|>>>>>>>)/;function e_(e){return document.querySelector(".js-resolve-conflicts-form").elements.namedItem(e)}let ek=new WeakMap;function eL(e){let t=e_(e);return ek.get(t)}async function eE(e){let t=document.querySelector(".js-code-editor");if(!(t instanceof HTMLElement))return;let n=await (0,r.B)(t);function o(){let t=e.getAttribute("data-filename")||"",n=eL(`files[${t}]`);if(null==n)throw Error("Expected file data to be loaded and was not");eR(n)}n.off("change",o),n.on("change",o);let i=t.closest(".js-conflict-resolver");null!=i&&(i.classList.add("loading"),n.loading(async()=>{let t=e.getAttribute("data-filename");if(!t)return;let o=`files[${t}]`,r=document.querySelector(".js-resolve-file-form");for(let n of(r.elements.namedItem("filename").value=o,r.querySelector(".js-filename").textContent=decodeURIComponent(t),r.classList.toggle("is-resolved",e.classList.contains("resolved")),e.parentNode.children))n.classList.toggle("selected",n===e);let a=eL(o);if(!a){var l;let t=await fetch(e.href,{headers:{...(0,s.kt)(),Accept:"application/json"}});if(!t.ok){let e=Error(),n=t.statusText?` ${t.statusText}`:"";throw e.message=`HTTP ${t.status}${n}`,e}let n=await t.json();eR(a={document:z.Doc(n.conflicted_file.data,n.conflicted_file.codemirror_mime_type),headDocument:z.Doc(n.head.data,n.head.codemirror_mime_type),baseDocument:z.Doc(n.base.data,n.base.codemirror_mime_type),conflicts:[]}),l=a,ek.set(e_(o),l)}i.classList.remove("loading"),n.setDocument(a.document),document.querySelector(".js-code-editor .js-conflict-count").textContent=new Intl.NumberFormat("en-US").format(a.conflicts.length);let c=document.querySelector(".js-code-editor .js-conflict-label");c.textContent=c.getAttribute(1===a.conflicts.length?"data-singular-string":"data-plural-string");let u=document.querySelector(".js-conflict-keyboard-hint-button");u?(eC(!0,!1),u.focus()):eC(!0)}))}function eR(e){let t={};e.conflicts=[];let n=e.document;for(let o of(e.document.eachLine(o=>{if(o){if(n.setGutterMarker(o,"merge-gutter",null),n.removeLineClass(o,"text","conflict-start-line"),n.removeLineClass(o,"text","conflict-end-line"),o?.widgets)for(let e of o.widgets.slice())n.removeLineWidget(e);if(!t.start&&ew.test(o.text)?t.start=o:t.start&&ev.test(o.text)?t.middle=o:t.start&&ey.test(o.text)&&(t.end=o),t.start){let e=".js-line";t.start===o?e=".js-start":t.middle===o?e=".js-middle":t.end===o&&(e=".js-end");let r=document.querySelector(`.js-conflict-gutters ${e}`).cloneNode(!0);n.setGutterMarker(o,"merge-gutter",r)}t.end&&(e.conflicts.push(t),t={})}}),e.conflicts)){let e=(o.start?.widgets?.length??0)>0;if(o.start&&o.middle&&o.end&&!e){let e=function(e){let t=document.createElement("div"),n=(e,t)=>{let n=document.createElement("button");return n.className="btn-link text-bold",n.textContent=`Accept ${e} change${"both"===e?"s":""}`,n.addEventListener("click",({target:n})=>{!function(e,t,n){let o=!1,r=[];e.eachLine(n,1/0,n=>{let i=n.text;return t===eb.BOTH?eS.test(i)&&r.push(e.getLineNumber(n)):(ew.test(i)?o=t===eb.INCOMING:ev.test(i)&&(o=t===eb.CURRENT),(o||eS.test(i))&&r.push(e.getLineNumber(n))),ey.test(i)});let i=r.map(e=>({anchor:{line:e,ch:0},head:{line:e,ch:0}})),a=e.getEditor(),l=r[0];null!=l&&(a.setSelections(i),a.execCommand("deleteLine"),a.setCursor(l,0),setTimeout(()=>a.focus(),0))}(t,e,Number(n.closest(".CodeMirror-gutter-wrapper, .CodeMirror-linewidget").parentElement.querySelector(".CodeMirror-linenumber").textContent)-1),setTimeout(()=>{(0,ep.kY)(`Successfully applied ${e} change${"both"===e?"s":""}.`)},50)}),n};return t.append(n("current",e)," | ",n("incoming",e)," | ",n("both",e)),t}(n);n.addLineWidget(o.start,e,{above:!0,noHScroll:!0});if(o.start){let e=n.getLineNumber(o.start);n.addLineClass(e,"text","conflict-start-line")}if(o.end){let e=n.getLineNumber(o.end);n.addLineClass(e,"text","conflict-end-line")}n.setCursor(n.getCursor())}}}function eC(e,t=!0){let n=eL(document.querySelector(".js-resolve-file-form").elements.namedItem("filename").value);if(null==n)throw Error("Expected file data to be loaded and was not");let o=n.document.getCursor().line,r=n.conflicts,i=null;for(let t=e?0:r.length-1;e?t=0;e?t++:t--){let a=r[t].middle;if(null==a)continue;let l=n.document.getLineNumber(a);if(e&&l>o||!e&&l]{7}/m.test(n.code()),a=t.querySelector("button.js-mark-resolved");a.classList.toggle("disabled",i),a.classList.toggle("tooltipped",i),i?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled");let l=i?a.getAttribute("data-disabled-label"):"";l&&a.setAttribute("aria-label",l)}),(0,i.lB)(".js-conflict-list",function(e){let t=e.querySelector(".js-conflicted-file");t instanceof HTMLAnchorElement&&eE(t);let n=document.querySelector(".new-discussion-timeline");n&&(n.classList.remove("px-3"),n.classList.add("p-0"))}),(0,a.on)("change",".js-conflict-resolution-choice-option",function(e){let t=e.target,n=t.closest(".js-resolve-conflicts-form"),o=n.querySelector(".js-resolve-conflicts-button"),r=n.querySelector(".js-quick-pull-new-branch-name");"direct"===t.value?(o.textContent=o.getAttribute("data-update-text"),o.removeAttribute("data-disable-invalid"),o.removeAttribute("disabled"),r.setAttribute("disabled","true")):(o.textContent=o.getAttribute("data-new-branch-text"),o.setAttribute("data-disable-invalid","true"),r.removeAttribute("disabled"),(0,eh.t)(n))})},80780:(e,t,n)=>{n.d(t,{V3:()=>c,_y:()=>s,wk:()=>l});var o=n(54571),r=n(39111);let i={cursorNavigationHopWordLeft:{hotkey:"Alt+ArrowLeft,Ctrl+ArrowLeft",useWhileBlobFocused:!0,noModifierHotkey:["ArrowLeft"],modifierRequired:!0},cursorNavigationHopWordRight:{hotkey:"Alt+ArrowRight,Ctrl+ArrowRight",useWhileBlobFocused:!0,noModifierHotkey:["ArrowRight"],modifierRequired:!0},cursorNavigationTopOfPage:{hotkey:"Meta+ArrowUp",useWhileBlobFocused:!0,noModifierHotkey:["ArrowUp"],modifierRequired:!0},cursorNavigationBottomOfPage:{hotkey:"Meta+ArrowDown",useWhileBlobFocused:!0,noModifierHotkey:["ArrowDown"],modifierRequired:!0},cursorNavigationEnd:{hotkey:"End,Meta+ArrowRight",useWhileBlobFocused:!0,noModifierHotkey:["End"]},cursorNavigationHome:{hotkey:"Home,Meta+ArrowLeft",useWhileBlobFocused:!0,noModifierHotkey:["Home"]},cursorNavigationPageUp:{hotkey:"PageUp",useWhileBlobFocused:!0,noModifierHotkey:["PageUp"]},cursorNavigationPageDown:{hotkey:"PageDown",useWhileBlobFocused:!0,noModifierHotkey:["PageDown"]},cursorNavigationArrowDown:{hotkey:"ArrowDown",useWhileBlobFocused:!0,noModifierHotkey:["ArrowDown"]},cursorNavigationArrowUp:{hotkey:"ArrowUp",useWhileBlobFocused:!0,noModifierHotkey:["ArrowUp"]},cursorNavigationArrowLeft:{hotkey:"ArrowLeft",useWhileBlobFocused:!0,noModifierHotkey:["ArrowLeft"]},cursorNavigationArrowRight:{hotkey:"ArrowRight",useWhileBlobFocused:!0,noModifierHotkey:["ArrowRight"]},cursorNavigationShiftHopWordLeft:{hotkey:"Alt+Shift+ArrowLeft,Ctrl+Shift+ArrowLeft",useWhileBlobFocused:!0,noModifierHotkey:["ArrowLeft"],modifierRequired:!0},cursorNavigationShiftHopWordRight:{hotkey:"Alt+Shift+ArrowRight,Ctrl+Shift+ArrowRight",useWhileBlobFocused:!0,noModifierHotkey:["ArrowRight"],modifierRequired:!0},cursorNavigationShiftTopOfPage:{hotkey:"Meta+Shift+ArrowUp",useWhileBlobFocused:!0,noModifierHotkey:["ArrowUp"],modifierRequired:!0},cursorNavigationShiftBottomOfPage:{hotkey:"Meta+Shift+ArrowDown",useWhileBlobFocused:!0,noModifierHotkey:["ArrowDown"],modifierRequired:!0},cursorNavigationShiftEnd:{hotkey:"Shift+End,Meta+Shift+ArrowRight",useWhileBlobFocused:!0,noModifierHotkey:["End"],modifierRequired:!0},cursorNavigationShiftHome:{hotkey:"Shift+Home,Meta+Shift+ArrowLeft",useWhileBlobFocused:!0,noModifierHotkey:["Home"],modifierRequired:!0},cursorNavigationShiftPageUp:{hotkey:"Shift+PageUp",useWhileBlobFocused:!0,noModifierHotkey:["PageUp"],modifierRequired:!0},cursorNavigationShiftPageDown:{hotkey:"Shift+PageDown",useWhileBlobFocused:!0,noModifierHotkey:["PageDown"],modifierRequired:!0},cursorNavigationShiftArrowDown:{hotkey:"Shift+ArrowDown",useWhileBlobFocused:!0,noModifierHotkey:["ArrowDown"],modifierRequired:!0},cursorNavigationShiftArrowUp:{hotkey:"Shift+ArrowUp",useWhileBlobFocused:!0,noModifierHotkey:["ArrowUp"],modifierRequired:!0},cursorNavigationShiftArrowLeft:{hotkey:"Shift+ArrowLeft",useWhileBlobFocused:!0,noModifierHotkey:["ArrowLeft"],modifierRequired:!0},cursorNavigationShiftArrowRight:{hotkey:"Shift+ArrowRight",useWhileBlobFocused:!0,noModifierHotkey:["ArrowRight"],modifierRequired:!0},cursorNavigationHighlightLine:{text:"J",hotkey:"Shift+J",useWhileBlobFocused:!0,noModifierHotkey:["J"],modifierRequired:!0},cursorNavigationGoLineUp:{hotkey:"Ctrl+p",useWhileBlobFocused:!0,noModifierHotkey:["p"],modifierRequired:!0},cursorNavigationOpenHelpDialog:{hotkey:"Alt+F1,Control+Alt+\u02D9,Control+Alt+h",useWhileBlobFocused:!0,noModifierHotkey:["F1","h","\u02D9"],modifierRequired:!0},cursorNavigationGoLineDown:{hotkey:"Ctrl+n",useWhileBlobFocused:!0,noModifierHotkey:["n"],modifierRequired:!0},cursorNavigationEnter:{text:"\u2318 Enter",hotkey:"Meta+Enter",useWhileBlobFocused:!0,noModifierHotkey:["Enter"],modifierRequired:!0},cursorNavigationSpace:{hotkey:" ",useWhileBlobFocused:!0,noModifierHotkey:[" "],modifierRequired:!1},cursorNavigationShiftSpace:{hotkey:"Shift+ ",useWhileBlobFocused:!0,noModifierHotkey:[" "],modifierRequired:!0},expandAndFocusLineContextMenu:{text:"Shift Alt C",hotkey:"Alt+Shift+C,Alt+Shift+\xc7",useWhileBlobFocused:!0,noModifierHotkey:["C"],modifierRequired:!0},copyFilePathShortcut:{text:"\u2318 shift .",hotkey:"Meta+Shift+>",useWhileBlobFocused:!0,noModifierHotkey:["."],modifierRequired:!0},copyPermalinkShortcut:{text:"\u2318 shift ,",hotkey:"Meta+Shift+<",useWhileBlobFocused:!0,noModifierHotkey:[","],modifierRequired:!0},copyRawContentShortcut:{text:"\u2318 shift c",hotkey:"Meta+Shift+C",useWhileBlobFocused:!0,noModifierHotkey:["c"],modifierRequired:!0},downloadRawContentShortcut:{text:"\u2318 shift s",hotkey:"Meta+Shift+S",useWhileBlobFocused:!0,noModifierHotkey:["s"],modifierRequired:!0},editFileShortcut:{hotkey:"e,Shift+E",useWhileBlobFocused:!0,noModifierHotkey:["e","E"]},goToLineShortcut:{text:"l",hotkey:"l,Shift+L",ariaKeyShortcuts:"l",useWhileBlobFocused:!0,noModifierHotkey:["l","L"]},alternativeGoToLineShortcut:{hotkey:"Mod+Alt+g",ariaKeyShortcuts:"Mod+Alt+g",useWhileBlobFocused:!0,noModifierHotkey:["g","G"]},findInFileShortcut:{hotkey:"Meta+f, F3",text:"\u2318 f",ariaKeyShortcuts:"Meta+F",useWhileBlobFocused:!0,noModifierHotkey:["f","F3"],modifierRequired:!0},findFilesShortcut:{hotkey:"t,Shift+T",useWhileBlobFocused:!0,noModifierHotkey:["t","T"]},findSelectionShortcut:{hotkey:"Meta+e",useWhileBlobFocused:!0,noModifierHotkey:["e"],modifierRequired:!0},findNextShortcut:{hotkey:"Mod+g"},findPrevShortcut:{hotkey:"Mod+Shift+G"},openWithGitHubDevShortcut:{hotkey:"., Meta+Shift+/",useWhileBlobFocused:!0,noModifierHotkey:["."]},openWithGitHubDevInNewWindowShortcut:{hotkey:"Shift+.,Shift+>,>",useWhileBlobFocused:!0,noModifierHotkey:[">"]},permalinkShortcut:{hotkey:"y,Shift+Y",useWhileBlobFocused:!0,noModifierHotkey:["y","Y"]},searchShortcut:{hotkey:"/",useWhileBlobFocused:!0,noModifierHotkey:["/"]},selectAllShortcut:{hotkey:"Meta+a",useWhileBlobFocused:!0,noModifierHotkey:["a"],modifierRequired:!0},selectEditTabShortcut:{hotkey:"Mod+Shift+P"},submitCommitDialogShortcut:{hotkey:"Mod+Enter"},refSelectorShortcut:{hotkey:"w",text:"w",useWhileBlobFocused:!0,noModifierHotkey:["w"]},escapeRightClickMenu:{hotkey:"Escape",useWhileBlobFocused:!0,noModifierHotkey:["Escape"]},toggleFocusedPaneShortcut:{hotkey:"Meta+F6,Meta+Shift+F6",useWhileBlobFocused:!0,noModifierHotkey:["F6"],modifierRequired:!0},toggleSymbolsShortcut:{hotkey:"Meta+i",useWhileBlobFocused:!0,noModifierHotkey:["i"],modifierRequired:!0},toggleTreeShortcut:{hotkey:"Meta+b",useWhileBlobFocused:!0,noModifierHotkey:["b"],modifierRequired:!0},viewBlameShortcut:{hotkey:"b,Shift+B,Meta+/ Meta+b",useWhileBlobFocused:!0,noModifierHotkey:["b"]},viewCodeShortcut:{hotkey:"Meta+/ Meta+c",useWhileBlobFocused:!0,modifierRequired:!0},viewPreviewShortcut:{hotkey:"Meta+/ Meta+p"},viewRawContentShortcut:{text:"\u2318 / \u2318 r",hotkey:"Meta+/ Meta+r",useWhileBlobFocused:!0,noModifierHotkey:["r"],modifierRequired:!0},findSymbolShortcut:{hotkey:"r,Shift+R",useWhileBlobFocused:!0,noModifierHotkey:["r","R"],modifierRequired:!1}},a=new Map;function l(){let e=(0,r.X)(["mac"]),[t]=(0,o.I)(()=>!1,!0,[]),n=0;if(e?n=1:t||(n=2),!a.has(n)){var l,s;let o=i;e||t||(o=Object.keys(l=o).reduce((e,t)=>{let n=l[t];return e[t]={hotkey:n.hotkey?.replace(/Meta/g,"Control"),text:n.text?.replace(/⌘/g,"Ctrl").replace(/⇧/g,"Shift"),ariaKeyShortcuts:n.ariaKeyShortcuts?.replace(/Meta/g,"Control"),useWhileBlobFocused:n.useWhileBlobFocused,modifierRequired:n.modifierRequired,noModifierHotkey:n.noModifierHotkey},e},{})),t&&(o=Object.keys(s=o).reduce((e,t)=>{let n=s[t];return e[t]={hotkey:void 0,text:n.text?.replace(/⌘/g,"Ctrl").replace(/⇧/g,"Shift"),ariaKeyShortcuts:n.ariaKeyShortcuts?.replace(/Meta/g,"Control"),useWhileBlobFocused:n.useWhileBlobFocused,modifierRequired:n.modifierRequired,noModifierHotkey:n.noModifierHotkey},e},{})),a.set(n,o)}return a.get(n)}function s(){let e=l();return Object.keys(e).reduce((t,n)=>{let o=e[n];if(o.useWhileBlobFocused&&o.noModifierHotkey&&o.modifierRequired)for(let e of o.noModifierHotkey)t.includes(e)||t.push(e);return t},[])}function c(){let e=l();return Object.keys(e).reduce((t,n)=>{let o=e[n];if(o.useWhileBlobFocused&&o.noModifierHotkey&&!o.modifierRequired)for(let e of o.noModifierHotkey)t.includes(e)||t.push(e);return t},[])}},82075:(e,t,n)=>{n.d(t,{A:()=>a,D:()=>l});var o=n(71315),r=n(11083);let i=class NoOpStorage{getItem(){return null}setItem(){}removeItem(){}clear(){}key(){return null}get length(){return 0}};function a(e,t={throwQuotaErrorsOnSet:!1},n=o.cg,l=e=>e,s=e=>e){let c;try{if(!n)throw Error();c=n[e]||new i}catch{c=new i}let{throwQuotaErrorsOnSet:u}=t;function d(e){t.sendCacheStats&&(0,r.i)({incrementKey:e})}function f(e){try{if(c.removeItem(e),t.ttl){let t=`${e}:expiry`;c.removeItem(t)}}catch{}}return{getItem:function(e,t=Date.now()){try{let n=c.getItem(e);if(!n)return null;let o=`${e}:expiry`,r=Number(c.getItem(o));if(r&&t>r)return f(e),f(o),d("SAFE_STORAGE_VALUE_EXPIRED"),null;return d("SAFE_STORAGE_VALUE_WITHIN_TTL"),l(n)}catch{return null}},setItem:function(e,n,o=Date.now()){try{if(c.setItem(e,s(n)),t.ttl){let n=`${e}:expiry`,r=o+t.ttl;c.setItem(n,r.toString())}}catch(e){if(u&&e instanceof Error&&e.message.toLowerCase().includes("quota"))throw e}},removeItem:f,clear:c.clear,getKeys:function(){return Object.keys(c)},get length(){return c.length}}}function l(e){return a(e,{throwQuotaErrorsOnSet:!1},o.cg,JSON.parse,JSON.stringify)}},82247:(e,t,n)=>{n.d(t,{A:()=>o});function o(e){return!(e.offsetWidth<=0&&e.offsetHeight<=0)}},82591:(e,t,n)=>{n.d(t,{z:()=>o});let o=Object.freeze({INITIAL:"soft-nav:initial",START:"soft-nav:start",REPLACE_MECHANISM:"soft-nav:replace-mechanism",SUCCESS:"soft-nav:success",ERROR:"soft-nav:error",FRAME_UPDATE:"soft-nav:frame-update",END:"soft-nav:end",RENDER:"soft-nav:render",PROGRESS_BAR:{START:"soft-nav:progress-bar:start",END:"soft-nav:progress-bar:end"}})},87057:(e,t,n)=>{n.d(t,{O:()=>a,S:()=>i});var o=n(71315);let r=o.cg?.document?.head?.querySelector('meta[name="release"]')?.content||"",i="X-GitHub-Client-Version";function a(){return r}},87363:(e,t,n)=>{n.d(t,{Ff:()=>s,eC:()=>c,uE:()=>l});var o=n(6986);let r=!1,i=new o.A;function a(e){let t=e.target;if(t instanceof HTMLElement&&t.nodeType!==Node.DOCUMENT_NODE)for(let e of i.matches(t))e.data.call(null,t)}function l(e,t){r||(r=!0,document.addEventListener("focus",a,!0)),i.add(e,t),document.activeElement instanceof HTMLElement&&document.activeElement.matches(e)&&t(document.activeElement)}function s(e,t,n){function o(t){let r=t.currentTarget;r&&(r.removeEventListener(e,n),r.removeEventListener("blur",o))}l(t,function(t){t.addEventListener(e,n),t.addEventListener("blur",o)})}function c(e,t){function n(e){let{currentTarget:o}=e;o&&(o.removeEventListener("input",t),o.removeEventListener("blur",n))}l(e,function(e){e.addEventListener("input",t),e.addEventListener("blur",n)})}},87465:(e,t,n)=>{n.d(t,{JC:()=>o.JC,KK:()=>o.KK,SK:()=>i,Vy:()=>o.Vy,ai:()=>o.ai,oc:()=>o.oc,rd:()=>o.rd});var o=n(50515);let r=/(?:^|,)((?:[^,]|,(?=\+| |$))*(?:,(?=,))?)/g;function i(e){return Array.from(e.matchAll(r)).map(([,e])=>e)}},88057:(e,t,n)=>{n.d(t,{Ex:()=>a,kt:()=>s,xA:()=>l});var o=n(71315);let r=Array(10).fill(null),i=0;function a(e){r[i]=e,i=(i+1)%10}function l(){let e=[];for(let t=0;t<10;t++){let n=r[(i-1-t+10)%10];n&&e.push(n)}return e}function s(){let e=o.XC;if(!e)return;let t=e.querySelector('meta[name="request-id"]'),n=t?.getAttribute("content");n&&a(n)}},88431:(e,t,n)=>{n.d(t,{N:()=>i});var o=n(71315),r=n(96540);let i=void 0!==o.cg?.document?.createElement?r.useLayoutEffect:r.useEffect},88578:(e,t,n)=>{function o(e){let t=e.closest("form");if(!(t instanceof HTMLFormElement))return;let n=r(t);if(e.name){let o=e.matches("input[type=submit]")?"Submit":"",r=e.value||o;n||((n=document.createElement("input")).type="hidden",n.classList.add("js-submit-button-value"),t.prepend(n)),n.name=e.name,n.value=r}else n&&n.remove()}function r(e){let t=e.querySelector("input.js-submit-button-value");return t instanceof HTMLInputElement?t:null}n.d(t,{A:()=>o,C:()=>r})},94416:(e,t,n)=>{n.d(t,{BW:()=>r,Ff:()=>m,HK:()=>y,JA:()=>E,LM:()=>h,Pv:()=>_,Vy:()=>f,ZW:()=>S,dR:()=>v,di:()=>g,fX:()=>k,gc:()=>L,k9:()=>w,my:()=>b,r7:()=>R,wG:()=>p,xT:()=>d});var o=n(95800);let r="reload",i="soft-nav:fail",a="soft-nav:fail-referrer",l="soft-nav:referrer",s="soft-nav:marker",c="soft-nav:react-app-name",u="soft-nav:latest-mechanism";function d(){(0,o.SO)(s,"0"),(0,o.Ai)(l),(0,o.Ai)(i),(0,o.Ai)(a),(0,o.Ai)(c),(0,o.Ai)(u)}function f(e){(0,o.SO)(s,e)}function m(){(0,o.SO)(s,"0")}function h(){let e=(0,o.Gq)(s);return e&&"0"!==e}function g(){return(0,o.Gq)(s)}function p(){return!!b()}function b(){return(0,o.Gq)(i)}function w(e){(0,o.SO)(i,e||r),(0,o.SO)(a,window.location.href)}function y(){(0,o.SO)(l,window.location.href)}function v(){return(0,o.Gq)(l)||document.referrer}function S(){let e=k();e?(0,o.SO)(c,e):(0,o.Ai)(c)}function _(){return(0,o.Gq)(c)}function k(){return document.querySelector("projects-v2")?"memex":document.querySelector('react-partial[partial-name="repos-overview"]')?"repos-overview":document.querySelector("react-app")?.getAttribute("app-name")}function L(){return!!document.querySelector("react-app")?.getAttribute("app-name")||!!document.querySelector("projects-v2")}function E(e){(0,o.SO)(u,e)}function R(){return(0,o.Gq)(u)}},95439:(e,t,n)=>{function o(e){let t=e.split("\u200D"),n=0;for(let e of t)n+=Array.from(e.split(/[\ufe00-\ufe0f]/).join("")).length;return n/t.length}function r(e,t,n,o=!0){let i=e.value.substring(0,e.selectionEnd||0),a=e.value.substring(e.selectionEnd||0);return l(e,(i=i.replace(t,n))+(a=a.replace(t,n)),i.length,o),n}function i(e,t,n){if(null===e.selectionStart||null===e.selectionEnd)return r(e,t,n);let o=e.value.substring(0,e.selectionStart),i=e.value.substring(e.selectionEnd);return l(e,o+n+i,o.length),n}function a(e,t,n={}){let o=e.selectionEnd||0,r=e.value.substring(0,o),i=e.value.substring(o),l=(""===e.value||r.match(/\n$/)?"":` `)+t+(n.appendNewline?` `:"");e.value=r+l+i;let s=o+l.length;return e.selectionStart=s,e.selectionEnd=s,e.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!1})),e.focus(),l}function l(e,t,n,o=!0){e.value=t,o&&(e.selectionStart=n,e.selectionEnd=n),e.dispatchEvent(new CustomEvent("change",{bubbles:!0,cancelable:!1}))}function s(e,t){let n=[...e],o=new TextEncoder,r=new Uint8Array(4);for(let e=0;e=t))break}return t}n.d(t,{bV:()=>o,bc:()=>a,ee:()=>r,kN:()=>s,tJ:()=>i})},95800:(e,t,n)=>{n.d(t,{Ai:()=>i,Gq:()=>o,SO:()=>r});let{getItem:o,setItem:r,removeItem:i}=(0,n(82075).A)("sessionStorage")},96379:(e,t,n)=>{n.d(t,{DI:()=>a,QJ:()=>s,Sr:()=>c,lS:()=>l});var o=n(51987),r=n(88057),i=n(37285);async function a(e,t={}){var n=e;if(new URL(n,window.location.origin).origin!==window.location.origin)throw Error("Can not make cross-origin requests from verifiedFetch");let{tracingEnabled:l,fetchPath:s}=function(e){let t=new URL(e,window.location.href),n=new URL(window.location.href,window.location.origin),o=n.searchParams.get("_features");o&&!t.searchParams.has("_features")&&t.searchParams.set("_features",o);let r=n.searchParams.get("_tracing");return r&&!t.searchParams.has("_tracing")&&t.searchParams.set("_tracing",r),{tracingEnabled:!!r,fetchPath:e.startsWith(window.location.origin)?t.href:`${t.pathname}${t.search}`}}(e),c={...t.headers,"GitHub-Verified-Fetch":"true",...(0,o.kt)()},u=await fetch(s,{...t,headers:c}),d=u?.headers?.get("X-Github-Request-Id");if(d&&(0,r.Ex)(d),l&&u){let e=u.clone();try{let t=await e.text(),n=t&&JSON.parse(t);(0,i.Av)(n)}catch{}}return u}function l(e,t){let n={...t?.headers??{},Accept:"application/json","Content-Type":"application/json"},o=t?.body?JSON.stringify(t.body):void 0;return a(e,{...t,body:o,headers:n})}function s(e,t={}){let n={...t.headers,"GitHub-Is-React":"true"};return a(e,{...t,headers:n})}function c(e,t){let n={...t?.headers??{},"GitHub-Is-React":"true"};return l(e,{...t,headers:n})}},96459:(e,t,n)=>{n.d(t,{Z:()=>c,o:()=>u});var o=n(96540),r=n(88934),i=n(41245),a=n(65432),l=n(58578),s=n(24518);let c=()=>{let{routes:e}=o.useContext(s.k),t=(0,r.Zp)();return o.useCallback((s,c={})=>{let u=(0,r.o1)(s).pathname;if(!(0,r.ue)(e,u)||c.reloadDocument){let e="string"==typeof s?s:(0,r.AO)(s);c.preventTurbo?window.location.href=e:(async()=>{let{softNavigate:t}=await Promise.all([n.e("vendors-node_modules_github_turbo_dist_turbo_es2017-esm_js"),n.e("packages_soft-navigate_soft-navigate_ts")]).then(n.bind(n,54563));t(e)})()}else{(0,i.A)(location.href,s.toString())||(0,a.SC)("react");let{preventAutofocus:e,...n}=c;(0,o.startTransition)(()=>{t(s,e?{...n,state:{[l.V]:!0,...n.state}}:n)})}},[t,e])},u=()=>{let[e]=(0,r.ok)(),t=c(),{pathname:n}=(0,r.zy)(),i=o.useCallback((o,i={})=>{t({pathname:n,search:(0,r.PI)("function"==typeof o?o(e):o).toString()},i)},[e,t,n]);return[e,i]}},99223:(e,t,n)=>{n.d(t,{k:()=>a,v:()=>l});var o=n(5225),r=n(71315);let i=(0,o.A)(function(){return r.XC?.head?.querySelector('meta[name="runtime-environment"]')?.content||""}),a=(0,o.A)(function(){return"enterprise"===i()}),l="webpack"}},e=>{e.O(0,["primer-react","react-lib","react-core","octicons-react","vendors-node_modules_primer_behaviors_dist_esm_index_mjs","vendors-node_modules_oddbird_popover-polyfill_dist_popover-fn_js","vendors-node_modules_emotion_is-prop-valid_dist_emotion-is-prop-valid_esm_js-node_modules_emo-825c28","vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_github_hydro-analytics-c-c228f9","vendors-node_modules_github_selector-observer_dist_index_esm_js","vendors-node_modules_tanstack_react-virtual_dist_esm_index_js","vendors-node_modules_codemirror_lib_codemirror_js","vendors-node_modules_github_mini-throttle_dist_decorators_js-node_modules_codemirror_addon_co-ab5897","packages_paths_index_ts","packages_copilot-chat_utils_copilot-local-storage_ts","app_assets_modules_react-code-view_utilities_lines_ts"],()=>e(e.s=79198)),e.O()}]); //# sourceMappingURL=editor-6f2c60642567.js.map